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 + } + _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits