[PATCH] D124615: [AArch64][SVE] Restore SP from base pointer when it and SVE frame are present

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 28 12:32:07 PDT 2022


efriedma added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1961
+      TII->copyPhysReg(MBB, RestoreBegin, DL, AArch64::SP,
+                       RegInfo.getBaseRegister(), false);
+
----------------
Do we need to use emitFrameOffset() here?


================
Comment at: llvm/test/CodeGen/AArch64/framelayout-sve.mir:634
 # CHECK-NEXT: $sp = frame-destroy ADDVL_XXI $sp, 1
 # CHECK-NEXT: $sp = frame-destroy ADDXri $fp, 0, 0
 # CHECK-NEXT: frame-destroy CFI_INSTRUCTION def_cfa $wsp, 32
----------------
Can we optimize the stack computation in this case?  I can see why you need to set the stack pointer in general, but it doesn't seem necessary here.  I guess we can leave that for a followup, though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124615



More information about the llvm-commits mailing list