[TargetLowering] use APInt::getLowBitsSet instead of APInt::getAllOnes+zext. (#188384)
This commit is contained in:
parent
18250fd47b
commit
d362bd7b9d
@ -7428,7 +7428,7 @@ TargetLowering::prepareSREMEqFold(EVT SETCCVT, SDValue REMNode,
|
||||
// A = 2^(W-1)
|
||||
A = APInt::getSignedMinValue(W);
|
||||
// - Q = 2^(W-K) - 1
|
||||
Q = APInt::getAllOnes(W - K).zext(W);
|
||||
Q = APInt::getLowBitsSet(W, W - K);
|
||||
}
|
||||
|
||||
// If the divisor is 1 the result can be constant-folded. Likewise, we
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user