[PATCH] D116458: [X86] Improve selection of the mov instruction in FrameLowering

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 3 09:47:40 PST 2022


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

LGTM



================
Comment at: llvm/lib/Target/X86/X86FrameLowering.cpp:152
 
+static unsigned getMOVriOpcode(bool IsLP64, int64_t Imm) {
+  if (IsLP64) {
----------------
erikdesjardins wrote:
> craig.topper wrote:
> > This is Is64Bit not IsLP64 right?
> It depends on the callsite--one uses 32bit when `Is64Bit && !IsLP64`. I agree `IsLP64` is inaccurate though.
> 
> I'll rename to `Use64BitReg` for now, let me know if you have a better suggestion.
That works. I guess I didn't scroll down enough to notice that some callers use Is64Bit and some use LP64.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116458



More information about the llvm-commits mailing list