CodeGen: Allow small copyable blocks to "break" the CFG.
When choosing the best successor for a block, ordinarily we would have preferred
a block that preserves the CFG unless there is a strong probability the other
direction. For small blocks that can be duplicated we now skip that requirement
as well, subject to some simple frequency calculations.
Differential Revision: https://reviews.llvm.org/D28583
llvm-svn: 293716
diff --git a/llvm/test/CodeGen/SystemZ/int-cmp-44.ll b/llvm/test/CodeGen/SystemZ/int-cmp-44.ll
index 1b9a4ae..85a8788 100644
--- a/llvm/test/CodeGen/SystemZ/int-cmp-44.ll
+++ b/llvm/test/CodeGen/SystemZ/int-cmp-44.ll
@@ -473,8 +473,8 @@
%xor = xor i32 %val, 1
%add = add i32 %xor, 1000000
call void @foo()
- %cmp = icmp ne i32 %add, 0
- br i1 %cmp, label %exit, label %store
+ %cmp = icmp eq i32 %add, 0
+ br i1 %cmp, label %store, label %exit, !prof !1
store:
store i32 %add, i32 *%ptr
@@ -888,3 +888,5 @@
exit:
ret i64 %res
}
+
+!1 = !{!"branch_weights", i32 2, i32 1}