aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/cast_ptr.ll
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2007-02-22 15:17:45 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2007-02-22 15:17:45 +0000
commit082228b88488fac2c4daeef417e9a0ab66f73d3b (patch)
treef86fb086b2d9cdc8ebff3bd6fbbe671d6ae85ab4 /test/Transforms/InstCombine/cast_ptr.ll
parent2ad9f17fee5d6395cd8db81668853e6dbf94060b (diff)
missed cast elimination
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/cast_ptr.ll')
-rw-r--r--test/Transforms/InstCombine/cast_ptr.ll8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/cast_ptr.ll b/test/Transforms/InstCombine/cast_ptr.ll
index 19d3ca6f8e..dce62af766 100644
--- a/test/Transforms/InstCombine/cast_ptr.ll
+++ b/test/Transforms/InstCombine/cast_ptr.ll
@@ -1,6 +1,6 @@
; Tests to make sure elimination of casts is working correctly
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep '\([sz]ext\)\|\(trunc\)'
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep '\([sz]ext\)\|\(trunc\)|\(ptrtoint\)'
target pointersize = 32
@@ -13,3 +13,9 @@ sbyte* %test1(sbyte* %t) {
ret sbyte* %tv
}
+bool %test2(sbyte* %a, sbyte* %b) {
+%tmpa = cast sbyte* %a to uint
+%tmpb = cast sbyte* %b to uint
+%r = seteq uint %tmpa, %tmpb
+ret bool %r
+}