aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2006-10-22 19:53:27 +0000
committerNick Lewycky <nicholas@mxc.ca>2006-10-22 19:53:27 +0000
commit802fe27d3e61646fafa74332756c2fcd8f243fac (patch)
tree2acf82c2bb11f89a145681204c3738788fcbf40b /test/Transforms
parent32b1e87f111d79f3f5b0e86c8f138c02bef8aa18 (diff)
AllocaInst can't return a null pointer. Fixes missed optimization
opportunity pointed out by Andrew Lewycky. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31115 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/PredicateSimplifier/predsimplify.ll17
1 files changed, 16 insertions, 1 deletions
diff --git a/test/Transforms/PredicateSimplifier/predsimplify.ll b/test/Transforms/PredicateSimplifier/predsimplify.ll
index 89d5d4ce49..af6cd155a8 100644
--- a/test/Transforms/PredicateSimplifier/predsimplify.ll
+++ b/test/Transforms/PredicateSimplifier/predsimplify.ll
@@ -1,5 +1,5 @@
; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail &&
-; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep pass | wc -l | grep 3
+; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep -c pass | grep 4
void %test1(int %x) {
entry:
@@ -149,6 +149,21 @@ return:
ret void
}
+void %test10() {
+entry:
+ %A = alloca int
+ %B = seteq int* %A, null
+ br bool %B, label %cond_true, label %cond_false
+
+cond_true:
+ call void (...)* %fail ( )
+ ret void
+
+cond_false:
+ call void (...)* %pass ( )
+ ret void
+}
+
void %switch1(int %x) {
entry:
%A = seteq int %x, 10