Changes in directory llvm/test/Regression/Transforms/InstCombine:
2006-10-19-SignedToUnsignedCastAndConst.ll added (r1.1) 2004-11-27-SetCCForCastLargerAndConstant.ll updated: 1.5 -> 1.6 --- Log message: Fix bug in PR454: http://llvm.org/PR454 resolution. Added new test case. This fixes llvmAsmParser.cpp miscompile by llvm on PowerPC Darwin. --- Diffs of the changes: (+8 -24) 2004-11-27-SetCCForCastLargerAndConstant.ll | 24 ------------------------ 2006-10-19-SignedToUnsignedCastAndConst.ll | 8 ++++++++ 2 files changed, 8 insertions(+), 24 deletions(-) Index: llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll:1.1 *** /dev/null Thu Oct 19 13:54:18 2006 --- llvm/test/Regression/Transforms/InstCombine/2006-10-19-SignedToUnsignedCastAndConst.ll Thu Oct 19 13:54:08 2006 *************** *** 0 **** --- 1,8 ---- + ; This test case is reduced from llvmAsmParser.cpp + ; The optimizer should not remove the cast here. + ; RUN: llvm-as %s -o - | opt -instcombine | llvm-dis | grep 'cast.*int' + bool %test(short %X) { + %A = cast short %X to uint + %B = setgt uint %A, 1330 + ret bool %B + } Index: llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll diff -u llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll:1.5 llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll:1.6 --- llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll:1.5 Sun Apr 24 01:55:40 2005 +++ llvm/test/Regression/Transforms/InstCombine/2004-11-27-SetCCForCastLargerAndConstant.ll Thu Oct 19 13:54:08 2006 @@ -31,12 +31,6 @@ ret bool %C } -bool %lt_signed_to_small_unsigned(sbyte %SB) { - %Y = cast sbyte %SB to uint ; <uint> [#uses=1] - %C = setlt uint %Y, 17 ; <bool> [#uses=1] - ret bool %C -} - bool %lt_signed_to_small_signed(sbyte %SB) { %Y = cast sbyte %SB to int %C = setlt int %Y, 17 @@ -73,12 +67,6 @@ ret bool %C } -bool %lt_unsigned_to_small_signed(ubyte %SB) { - %Y = cast ubyte %SB to int - %C = setlt int %Y, 17 - ret bool %C -} - bool %lt_unsigned_to_small_negative(ubyte %SB) { %Y = cast ubyte %SB to int %C = setlt int %Y, -17 @@ -103,12 +91,6 @@ ret bool %C } -bool %gt_signed_to_small_unsigned(sbyte %SB) { - %Y = cast sbyte %SB to uint ; <uint> [#uses=1] - %C = setgt uint %Y, 17 ; <bool> [#uses=1] - ret bool %C -} - bool %gt_signed_to_small_signed(sbyte %SB) { %Y = cast sbyte %SB to int %C = setgt int %Y, 17 @@ -145,12 +127,6 @@ ret bool %C } -bool %gt_unsigned_to_small_signed(ubyte %SB) { - %Y = cast ubyte %SB to int - %C = setgt int %Y, 17 - ret bool %C -} - bool %gt_unsigned_to_small_negative(ubyte %SB) { %Y = cast ubyte %SB to int %C = setgt int %Y, -17 _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits