[PATCH] D89034: [SystemZ] Use LA instead of AGR in eliminateFrameIndex().

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 07:49:59 PDT 2020


uweigand added inline comments.


================
Comment at: llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp:325
+        BuildMI(MBB, MI, DL, TII->get(SystemZ::LA), ScratchReg)
+          .addReg(ScratchReg, RegState::Kill).addImm(0).addReg(BasePtr);
       }
----------------
I think it may be better from a micro-architecture perspective to use %r15 as the base pointer in the instruction here, i.e. swap the two source registers.  So we should get something like

   la %r1, 0(%r1, %r15)



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

https://reviews.llvm.org/D89034



More information about the llvm-commits mailing list