mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user