[PATCH] D141473: [PowerPC] Simplify fp-to-int store optimization

Qiu Chaofan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 01:22:32 PDT 2023


qiucf added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrP10.td:1258
+  def : Pat<(PPCstore_scal_int_from_vsr f128:$src, (PPCmatpcreladdr PCRelForm:$dst), 8),
+            (PSTXSDpc (COPY_TO_REGCLASS $src, VSRC), $dst, 0)>;
 
----------------
shchenz wrote:
> qiucf wrote:
> > shchenz wrote:
> > > Can you explain why we need to copy to regclass `VSRC`? The definition of `PSTXSDpc` seems requiring RC to be `VFRC` for `$src`.
> > Thanks, I updated the copied classes to respective regclass of the instructions. This `COPY_TO_REGCLASS` is needed, otherewise we'll get a `HW typeset is empty` build failure.
> Yeah, I know we need a `COPY_TO_REGCLASS`, my confusion is why the dest RC is `VSRC`, not the original `VFRC` as the `$src` for `PSTXSDpc` requires `VFRC`.
I updated them accordingly, they should get missed in last revision.

As of why `VSRC` also passes, I think the classes will be automatically shortened.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141473



More information about the llvm-commits mailing list