Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.523 -> 1.524 --- 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: (+3 -2) InstructionCombining.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.523 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.524 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.523 Thu Oct 19 14:21:36 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Oct 19 15:59:13 2006 @@ -4795,8 +4795,9 @@ // %B = setgt short %X, 1330 // // because %A may have negative value. - // However, it is OK if SrcTy is bool. See cast-set.ll testcase. - if (isSignSrc == isSignDest || SrcTy == Type::BoolTy) + // However, it is OK if SrcTy is bool (See cast-set.ll testcase) + // OR operation is EQ/NE. + if (isSignSrc == isSignDest || SrcTy == Type::BoolTy || SCI.isEquality()) RHSCIOp = Res; else return 0; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits