[llvm] [AArch64] Allow splitting bitmasks for EOR/ORR. (PR #150394)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 10:27:52 PDT 2025
================
@@ -190,19 +191,48 @@ static bool splitBitmaskImm(T Imm, unsigned RegSize, T &Imm1Enc, T &Imm2Enc) {
return true;
}
+template <typename T>
+static bool splitDisjointBitmaskImm(T Imm, unsigned RegSize, T &Imm1Enc,
+ T &Imm2Enc) {
+ // Try to split a bitmask of the form 0b00000000011000000000011110000000 into
+ // two disjoint masks such as 0b00000000011000000000000000000000 and
+ // 0b00000000000000000000011110000000 where the inclusive/exclusive OR of the
+ // new masks match the original mask.
+ unsigned LowestBitSet = llvm::countr_zero(Imm);
----------------
paulwalker-arm wrote:
Yes please.
https://github.com/llvm/llvm-project/pull/150394
More information about the llvm-commits
mailing list