mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[SimplifyDemandedBits] Use APInt::intersects to instead of ANDing and comparing to 0 separately. NFC
llvm-svn: 372158
This commit is contained in:
parent
f3b3429a72
commit
848c5cfc3a
@ -1285,7 +1285,7 @@ bool TargetLowering::SimplifyDemandedBits(
|
||||
// out) are never demanded.
|
||||
// TODO - support non-uniform vector amounts.
|
||||
if (Op0.getOpcode() == ISD::SRL) {
|
||||
if ((DemandedBits & APInt::getLowBitsSet(BitWidth, ShAmt)) == 0) {
|
||||
if (!DemandedBits.intersects(APInt::getLowBitsSet(BitWidth, ShAmt))) {
|
||||
if (ConstantSDNode *SA2 =
|
||||
isConstOrConstSplat(Op0.getOperand(1), DemandedElts)) {
|
||||
if (SA2->getAPIntValue().ult(BitWidth)) {
|
||||
@ -1392,7 +1392,8 @@ bool TargetLowering::SimplifyDemandedBits(
|
||||
if (Op0.getOpcode() == ISD::SHL) {
|
||||
if (ConstantSDNode *SA2 =
|
||||
isConstOrConstSplat(Op0.getOperand(1), DemandedElts)) {
|
||||
if ((DemandedBits & APInt::getHighBitsSet(BitWidth, ShAmt)) == 0) {
|
||||
if (!DemandedBits.intersects(
|
||||
APInt::getHighBitsSet(BitWidth, ShAmt))) {
|
||||
if (SA2->getAPIntValue().ult(BitWidth)) {
|
||||
unsigned C1 = SA2->getZExtValue();
|
||||
unsigned Opc = ISD::SRL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user