Changes in directory llvm/test/Regression/Transforms/InstCombine:
cast-and-cast.ll added (r1.1) --- Log message: Add a test to ensure a bitcast/and/trunc combination eliminates the bitcast. --- Diffs of the changes: (+14 -0) cast-and-cast.ll | 14 ++++++++++++++ 1 files changed, 14 insertions(+) Index: llvm/test/Regression/Transforms/InstCombine/cast-and-cast.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/cast-and-cast.ll:1.1 *** /dev/null Sun Nov 26 23:07:08 2006 --- llvm/test/Regression/Transforms/InstCombine/cast-and-cast.ll Sun Nov 26 23:06:58 2006 *************** *** 0 **** --- 1,14 ---- + ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep bitcast + bool %test1(uint %val) { + %t1 = bitcast uint %val to int + %t2 = and int %t1, 1 + %t3 = trunc int %t2 to bool + ret bool %t3 + } + + short %test1(uint %val) { + %t1 = bitcast uint %val to int + %t2 = and int %t1, 1 + %t3 = trunc int %t2 to short + ret short %t3 + } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits