[llvm] [AArch64] Add sext(shl x, imm)/sext(sra x, imm) selection patterns (PR #226065)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 06:35:21 PDT 2026


================
@@ -10936,6 +10951,18 @@ def : Pat<(sra (i64 (sext GPR32:$Rn)), (i64 imm0_31:$imm)),
                    (i64 imm0_31:$imm), 31)>;
 } // AddedComplexity = 20
 
+def : Pat<(i64 (sext (sra GPR32:$Rn, (i64 imm0_31:$imm)))),
----------------
KRM7 wrote:

Yes, this is just replacing the C++ code. The change is so that we have a chance to match the below 2 more complex patterns as well.

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


More information about the llvm-commits mailing list