[llvm] Missing AArch64ISD::BICi handling (PR #76644)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 31 06:21:08 PST 2023
================
@@ -26658,6 +26670,18 @@ bool AArch64TargetLowering::SimplifyDemandedBitsForTargetNode(
// used - simplify to just Val.
return TLO.CombineTo(Op, ShiftR->getOperand(0));
}
+ case AArch64ISD::BICi: {
+ // Fold BICi if all destination bits already known to be zeroed
+ SDValue Op0 = Op.getOperand(0);
+ KnownBits KnownOp0 = TLO.DAG.computeKnownBits(Op0, 0);
+ APInt Shift = Op.getConstantOperandAPInt(2);
+ APInt Op1Val = Op.getConstantOperandAPInt(1);
----------------
RKSimon wrote:
Just use getConstantOperandVal for these?
https://github.com/llvm/llvm-project/pull/76644
More information about the llvm-commits
mailing list