Changes in directory llvm/test/Regression/Transforms/InstCombine:
2006-10-19-SignedToUnsignedCastAndConst-2.ll added (r1.1) --- Log message: It is OK to remove extra cast if operation is EQ/NE even though source and destination sign may not match but other conditions are met. --- Diffs of the changes: (+9 -0) 2006-10-19-SignedToUnsignedCastAndConst-2.ll | 9 +++++++++ 1 files changed, 9 insertions(+) Index: llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll:1.1 *** /dev/null Thu Oct 19 15:59:23 2006 --- llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst-2.ll Thu Oct 19 15:59:13 2006 *************** *** 0 **** --- 1,9 ---- + ; The optimizer should be able to remove cast operation here. + ; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | not grep 'cast.*int' + + bool %eq_signed_to_small_unsigned(sbyte %SB) { + %Y = cast sbyte %SB to uint ; <uint> [#uses=1] + %C = seteq uint %Y, 17 ; <bool> [#uses=1] + ret bool %C + } + _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits