[PATCH] D155447: [AArch64] Fix an immediate out of range for large realignments on Windows

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 08:16:01 PDT 2023


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1748
+            .addReg(AArch64::SP)
+            .addReg(AArch64::X16);
+      } else {
----------------
You could stick a kill flag on x16 here, I guess, although it doesn't matter much this late in the pipeline.

Probably we should stick a FrameSetup flag on the add (for both cases).


================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1753
+            .addImm(RealignmentPadding)
+            .addImm(0);
+      }
----------------
If we care, for constants up to 1<<23, we can use a shifted immediate.  ("add sp, sp, #1, lsl #12"  etc.)   But probably not worth bothering.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155447/new/

https://reviews.llvm.org/D155447



More information about the llvm-commits mailing list