mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
PR7586: Make sure we don't claim that unknown bits are actually known in the
ISD::AND case of TargetLowering::SimplifyDemandedBits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e28015c02c
commit
1d17d199a4
@ -1497,11 +1497,10 @@ bool TargetLowering::SimplifyDemandedBits(SDValue Op,
|
|||||||
// present in the input.
|
// present in the input.
|
||||||
APInt NewBits =
|
APInt NewBits =
|
||||||
APInt::getHighBitsSet(BitWidth,
|
APInt::getHighBitsSet(BitWidth,
|
||||||
BitWidth - EVT.getScalarType().getSizeInBits()) &
|
BitWidth - EVT.getScalarType().getSizeInBits());
|
||||||
NewMask;
|
|
||||||
|
|
||||||
// If none of the extended bits are demanded, eliminate the sextinreg.
|
// If none of the extended bits are demanded, eliminate the sextinreg.
|
||||||
if (NewBits == 0)
|
if ((NewBits & NewMask) == 0)
|
||||||
return TLO.CombineTo(Op, Op.getOperand(0));
|
return TLO.CombineTo(Op, Op.getOperand(0));
|
||||||
|
|
||||||
APInt InSignBit = APInt::getSignBit(EVT.getScalarType().getSizeInBits());
|
APInt InSignBit = APInt::getSignBit(EVT.getScalarType().getSizeInBits());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user