[PATCH] D126807: [PowerPC] Fix LQ-STQ instructions to use correct offset and base

Kai Luo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 14 06:57:33 PDT 2022


lkail added a comment.

This fix looks making offset handling more complex. We can make it easier by add `LQX_PSEUDO` and `STQX_PSEUDO` to `ImmToIdxMap`.

  ImmToIdxMap[PPC::LQ]  = PPC::LQX_PSEUDO;
  ImmToIdxMap[PPC::STQ] = PPC::STQX_PSEUDO;

And expand `PPC::LQX_PSEUDO` and `PPC::STQX_PSEUDO` post RA(They are expanded in `PPCTargetLowering::EmitInstrWithCustomInserter` right now). Thus we make `LQ/STQ` fits in how we are handling frame index now, no more code is needed to handling the offset for `LQ/STQ`(When `LQ/STQ` are selected by ISEL, alignment is guaranteed to be 16 bytes since they are for atomic operations).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D126807



More information about the llvm-commits mailing list