mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Fix a type violation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2d4c98d79b
commit
79a564caa7
@ -2516,7 +2516,7 @@ Instruction *InstCombiner::visitShiftInst(ShiftInst &I) {
|
|||||||
|
|
||||||
if (isa<UndefValue>(Op0)) { // undef >>s X -> undef
|
if (isa<UndefValue>(Op0)) { // undef >>s X -> undef
|
||||||
if (!isLeftShift && I.getType()->isSigned())
|
if (!isLeftShift && I.getType()->isSigned())
|
||||||
return ReplaceInstUsesWith(I, Op1);
|
return ReplaceInstUsesWith(I, Op0);
|
||||||
else // undef << X -> 0 AND undef >>u X -> 0
|
else // undef << X -> 0 AND undef >>u X -> 0
|
||||||
return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType()));
|
return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user