[llvm] [AArch64] Allow splitting bitmasks for EOR/ORR. (PR #150394)
Ricardo Jesus via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 02:46:17 PDT 2025
================
@@ -125,8 +125,14 @@ struct AArch64MIPeepholeOpt : public MachineFunctionPass {
template <typename T>
bool visitADDSSUBS(OpcodePair PosOpcs, OpcodePair NegOpcs, MachineInstr &MI);
+ // Strategy used to split logical immediate bitmasks.
+ enum class SplitStrategy {
+ Intersect,
+ Disjoint,
+ };
template <typename T>
- bool visitAND(unsigned Opc, MachineInstr &MI, unsigned OtherOpc = 0);
+ bool trySplitLogicalImm(unsigned Opc, MachineInstr &MI,
+ SplitStrategy Strategy, unsigned OtherOpc = 0);
----------------
rj-jesus wrote:
I'm happy to revert this refactoring and keep separate visitAND and visitEOR/ORR methods if that's preferable.
https://github.com/llvm/llvm-project/pull/150394
More information about the llvm-commits
mailing list