[llvm] [AArch64] SimplifyDemandedBitsForTargetNode - add AArch64ISD::BICi handling (PR #76644)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 6 01:22:15 PST 2024
================
@@ -27324,6 +27337,21 @@ 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
----------------
RKSimon wrote:
Its always helpful to include in the comment what each of the immediate operands do, or name them:
```
uint64_t foo = Op->getConstantOperandVal(1);
uint64_t bar = Op->getConstantOperandVal(2);
uint64_t BitsToClear = foo << bar;
```
https://github.com/llvm/llvm-project/pull/76644
More information about the llvm-commits
mailing list