[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/cast_ptr.ll
Andrew Lenharth
alenhar2 at cs.uiuc.edu
Tue Sep 19 11:24:05 PDT 2006
Changes in directory llvm/test/Regression/Transforms/InstCombine:
cast_ptr.ll added (r1.1)
---
Log message:
Inspired by the linux kernel, the more we keep adds in the pointer realm, the better pointer analysis works.
---
Diffs of the changes: (+15 -0)
cast_ptr.ll | 15 +++++++++++++++
1 files changed, 15 insertions(+)
Index: llvm/test/Regression/Transforms/InstCombine/cast_ptr.ll
diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/cast_ptr.ll:1.1
*** /dev/null Tue Sep 19 13:23:49 2006
--- llvm/test/Regression/Transforms/InstCombine/cast_ptr.ll Tue Sep 19 13:23:39 2006
***************
*** 0 ****
--- 1,15 ----
+ ; Tests to make sure elimination of casts is working correctly
+ ; RUN: llvm-as < %s | opt -instcombine -disable-output &&
+ ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep cast
+
+ target pointersize = 32
+
+ implementation
+
+ sbyte* %test1(sbyte* %t) {
+ %tmpc = cast sbyte* %t to uint
+ %tmpa = add uint %tmpc, 32
+ %tv = cast uint %tmpa to sbyte*
+ ret sbyte* %tv
+ }
+
More information about the llvm-commits
mailing list