fix incorrect folding of icmp with undef, PR6481.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-03-03 19:46:03 +00:00
parent fec8657351
commit c8e14b3d37
3 changed files with 15 additions and 6 deletions
+1 -1
View File
@@ -1818,7 +1818,7 @@ Constant *llvm::ConstantFoldCompareInstruction(unsigned short pred,
// Handle some degenerate cases first
if (isa<UndefValue>(C1) || isa<UndefValue>(C2))
return UndefValue::get(ResultTy);
return ConstantInt::get(ResultTy, CmpInst::isTrueWhenEqual(pred));
// No compile-time operations on this type yet.
if (C1->getType()->isPPC_FP128Ty())