[llvm] Missing AArch64ISD::BICi handling (PR #76644)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 31 06:21:10 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);
----------------
RKSimon wrote:

Use the computeKnownBits variant with OriginalDemandedElts

Don't reset the recursion depth - it must be Depth + 1

https://github.com/llvm/llvm-project/pull/76644


More information about the llvm-commits mailing list