[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Dec 8 14:20:47 PST 2004
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.288 -> 1.289
---
Log message:
Fix Transforms/InstCombine/2004-12-08-RemInfiniteLoop.ll
---
Diffs of the changes: (+2 -1)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.288 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.289
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.288 Sun Nov 28 15:31:15 2004
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Wed Dec 8 16:20:34 2004
@@ -309,7 +309,8 @@
// Constants can be considered to be negated values if they can be folded...
if (Constant *C = dyn_cast<Constant>(V))
- return ConstantExpr::getNeg(C);
+ if (!isa<UndefValue>(C))
+ return ConstantExpr::getNeg(C);
return 0;
}
More information about the llvm-commits
mailing list