Skip to content

Commit d43030f

Browse files
committed
[ARM] Have knownbits for CMOV match that of CSEL in AArch64
1 parent f9c2565 commit d43030f

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

llvm/lib/Target/ARM/ARMISelLowering.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19951,14 +19951,11 @@ void ARMTargetLowering::computeKnownBitsForTargetNode(const SDValue Op,
1995119951
}
1995219952
break;
1995319953
case ARMISD::CMOV: {
19954-
// Bits are known zero/one if known on the LHS and RHS.
19955-
Known = DAG.computeKnownBits(Op.getOperand(0), Depth+1);
19956-
if (Known.isUnknown())
19957-
return;
19958-
19959-
KnownBits KnownRHS = DAG.computeKnownBits(Op.getOperand(1), Depth+1);
19960-
Known = Known.intersectWith(KnownRHS);
19961-
return;
19954+
KnownBits Known2;
19955+
Known = DAG.computeKnownBits(Op->getOperand(0), Depth + 1);
19956+
Known2 = DAG.computeKnownBits(Op->getOperand(1), Depth + 1);
19957+
Known = Known.intersectWith(Known2);
19958+
break;
1996219959
}
1996319960
case ISD::INTRINSIC_W_CHAIN: {
1996419961
Intrinsic::ID IntID =

0 commit comments

Comments
 (0)