[llvm-commits] [llvm] r51296 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Mon May 19 20:50:52 PDT 2008
Author: lattner
Date: Mon May 19 22:50:52 2008
New Revision: 51296
URL: http://llvm.org/viewvc/llvm-project?rev=51296&view=rev
Log:
fix two issues Neil noticed, thanks!
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=51296&r1=51295&r2=51296&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon May 19 22:50:52 2008
@@ -5435,7 +5435,7 @@
// Now we know that the APFloat is a normal number, zero or inf.
- // See if the FP constant is top large for the integer. For example,
+ // See if the FP constant is too large for the integer. For example,
// comparing an i8 to 300.0.
unsigned IntWidth = IntTy->getPrimitiveSizeInBits();
@@ -5561,10 +5561,10 @@
if (CFP->getValueAPF().isNaN()) {
if (FCmpInst::isOrdered(I.getPredicate())) // True if ordered and...
return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0));
- if (FCmpInst::isUnordered(I.getPredicate())) // True if unordered or...
- return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1));
- if (FCmpInst::isUnordered(I.getPredicate())) // Undef on unordered.
- return ReplaceInstUsesWith(I, UndefValue::get(Type::Int1Ty));
+ assert(FCmpInst::isUnordered(I.getPredicate()) &&
+ "Comparison must be either ordered or unordered!");
+ // True if unordered.
+ return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1));
}
}
More information about the llvm-commits
mailing list