summaryrefslogtreecommitdiff
path: root/test/Transforms/GVN
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-02-05 18:25:50 +0000
committerDuncan Sands <baldrick@free.fr>2012-02-05 18:25:50 +0000
commit33756f96d75e20d336f404debf701e8d6b4ecfc8 (patch)
tree6f264e2b9db41a01fb67ccf7fb894ca4fde8de62 /test/Transforms/GVN
parent68e20223a7260b5978dc85af6fea647be4c6a5f9 (diff)
downloadllvm-33756f96d75e20d336f404debf701e8d6b4ecfc8.tar.gz
llvm-33756f96d75e20d336f404debf701e8d6b4ecfc8.tar.bz2
llvm-33756f96d75e20d336f404debf701e8d6b4ecfc8.tar.xz
Reduce the number of dom queries made by GVN's conditional propagation
logic by half: isOnlyReachableViaThisEdge was trying to be clever and handle the case of a branch to a basic block which is contained in a loop. This costs a domtree lookup and is completely useless due to GVN's position in the pass pipeline: all loops have preheaders at this point, which means it is enough for isOnlyReachableViaThisEdge to check that Dst has only one predecessor. (I checked this theoretical argument by running over the entire nightly testsuite, and indeed it is so!). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149838 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/GVN')
-rw-r--r--test/Transforms/GVN/condprop.ll19
1 files changed, 0 insertions, 19 deletions
diff --git a/test/Transforms/GVN/condprop.ll b/test/Transforms/GVN/condprop.ll
index 0b31b01b7b..c17c994011 100644
--- a/test/Transforms/GVN/condprop.ll
+++ b/test/Transforms/GVN/condprop.ll
@@ -55,25 +55,6 @@ return: ; preds = %bb8
}
declare void @foo(i1)
-
-; CHECK: @test2
-define void @test2(i1 %x, i1 %y) {
- %z = or i1 %x, %y
- br i1 %z, label %true, label %false
-true:
-; CHECK: true:
- %z2 = or i1 %x, %y
- call void @foo(i1 %z2)
-; CHECK: call void @foo(i1 true)
- br label %true
-false:
-; CHECK: false:
- %z3 = or i1 %x, %y
- call void @foo(i1 %z3)
-; CHECK: call void @foo(i1 false)
- br label %false
-}
-
declare void @bar(i32)
; CHECK: @test3