mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
Fix a regression in a patch from a couple of days ago. This fixes
Transforms/InstCombine/2006-02-28-Crash.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26427 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f949c1ad6c
commit
06e1e25368
@ -4818,7 +4818,9 @@ Instruction *InstCombiner::visitCastInst(CastInst &CI) {
|
|||||||
if (Op1CV && (Op1CV != (KnownZero^TypeMask))) {
|
if (Op1CV && (Op1CV != (KnownZero^TypeMask))) {
|
||||||
// (X&4) == 2 --> false
|
// (X&4) == 2 --> false
|
||||||
// (X&4) != 2 --> true
|
// (X&4) != 2 --> true
|
||||||
return ReplaceInstUsesWith(CI, ConstantBool::get(isSetNE));
|
Constant *Res = ConstantBool::get(isSetNE);
|
||||||
|
Res = ConstantExpr::getCast(Res, CI.getType());
|
||||||
|
return ReplaceInstUsesWith(CI, Res);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned ShiftAmt = Log2_64(KnownZero^TypeMask);
|
unsigned ShiftAmt = Log2_64(KnownZero^TypeMask);
|
||||||
|
Loading…
Reference in New Issue
Block a user