[llvm] [AArch64] Allow peephole to optimize AND + signed compare with 0 (PR #153608)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 08:06:06 PST 2025


================
@@ -87,6 +87,26 @@ unsigned getNonFlagSettingVariant(unsigned Opc) {
     return AArch64::ADDXri;
   case AArch64::ADDSWri:
     return AArch64::ADDWri;
+  case AArch64::ANDSWri:
----------------
MacDue wrote:

This was marked as resolved and ignored, but this change does not relate to the rest of this PR (which is not in global ISEL). You can remove this, and all tests still pass. 

Your tests are only for a few AND cases, but you've implemented hooks for many more instructions that are untested. I think it would be better if you reduce the size of the PR to match the code paths you've tested. 

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


More information about the llvm-commits mailing list