summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-06-05 18:04:42 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-06-05 18:04:42 +0000
commit72cb5e1087ff018ba9eb0a226d41a8cc5bfe6a03 (patch)
tree28dd464f9fde93ee2476394cd9c0d3c6796b0b09 /llvm/test
parentcdffc36c119a7933c3e8871ccd0028f41d5b5feb (diff)
downloadbcm5719-llvm-72cb5e1087ff018ba9eb0a226d41a8cc5bfe6a03.tar.gz
bcm5719-llvm-72cb5e1087ff018ba9eb0a226d41a8cc5bfe6a03.zip
[InstCombine] Fix PR23751.
PR23751 was caused by a missing ``break;`` in r234388. llvm-svn: 239171
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Transforms/InstCombine/pr23751.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/pr23751.ll b/llvm/test/Transforms/InstCombine/pr23751.ll
new file mode 100644
index 00000000000..d7840be2f83
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/pr23751.ll
@@ -0,0 +1,13 @@
+; RUN: opt -instcombine -S < %s | FileCheck %s
+
+@d = common global i32 0, align 4
+
+define i1 @f(i8 zeroext %p) #1 {
+; CHECK-NOT: ret i1 false
+ %1 = zext i8 %p to i32
+ %2 = load i32, i32* @d, align 4
+ %3 = or i32 %2, -2
+ %4 = add nsw i32 %3, %1
+ %5 = icmp ugt i32 %1, %4
+ ret i1 %5
+}
OpenPOWER on IntegriCloud