summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/compare.ll
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-02-18 03:29:25 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-02-18 03:29:25 +0000
commit952d1f9f40733718774aaf3694dee41dae30e55a (patch)
treeb857f518932585e23c9187d1d7eb94d70a8b8c7d /llvm/test/Transforms/InstSimplify/compare.ll
parentd951a1d9c8fc0d4c6409dae93275515d076049ee (diff)
downloadbcm5719-llvm-952d1f9f40733718774aaf3694dee41dae30e55a.tar.gz
bcm5719-llvm-952d1f9f40733718774aaf3694dee41dae30e55a.zip
Fix a rather nasty regression from r150690: LHS != RHS does not imply LHS->stripPointerCasts() != RHS->stripPointerCasts().
llvm-svn: 150863
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/compare.ll')
-rw-r--r--llvm/test/Transforms/InstSimplify/compare.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll
index 60f5990840b..92b8fc7e3a9 100644
--- a/llvm/test/Transforms/InstSimplify/compare.ll
+++ b/llvm/test/Transforms/InstSimplify/compare.ll
@@ -30,6 +30,16 @@ define i1 @gep() {
; CHECK-NEXT: ret i1 false
}
+define i1 @gep2() {
+; CHECK: @gep2
+ %a = alloca [3 x i8], align 8
+ %x = getelementptr inbounds [3 x i8]* %a, i32 0, i32 0
+ %y = getelementptr inbounds [3 x i8]* %a, i32 0, i32 0
+ %cmp = icmp eq i8* %x, %y
+ ret i1 %cmp
+; CHECK-NEXT: ret i1 true
+}
+
define i1 @zext(i32 %x) {
; CHECK: @zext
%e1 = zext i32 %x to i64
OpenPOWER on IntegriCloud