[PATCH] D105661: [PowerPC] Add frame index alignment check if the the addressing mode is DS/DQ-Form, and fall back to X-Form if necessary.

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 8 14:30:40 PDT 2021


amyk created this revision.
amyk added reviewers: nemanjai, power-llvm-team, PowerPC.
amyk added projects: PowerPC, LLVM.
Herald added subscribers: shchenz, arphaman, hiraditya.
amyk requested review of this revision.

This patch adds a function that checks whether or not the frame index
is aligned when the computed addressing mode is an aligned D-Form (DS, or DQ-Form).
If the frame index appears to be unaligned, within these two modes, reset
the mode to X-Form in order to fall back to selection X-Form loads.

A test case is added to ensure that the test emits X-Form loads and not DQ-Form
loads since the frame index is not aligned within the test case.

For this patch, `lxvx` is produced since it's pattern utilizes `ForceXForm`, but this is 
to ensure that the  follow up patch,  D95115 <https://reviews.llvm.org/D95115>,  will continue to produce `lxvx` when the instruction is 
updated to no longer use `ForceXForm` (and instead just use `XForm`).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105661

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.cpp
  llvm/test/CodeGen/PowerPC/unaligned-dqform-ld.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105661.357353.patch
Type: text/x-patch
Size: 6561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210708/a43285af/attachment.bin>


More information about the llvm-commits mailing list