[PATCH] D113236: [PowerPC] use correct selection for v16i8/v8i16 splat load

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 4 20:30:51 PDT 2021


shchenz created this revision.
shchenz added reviewers: nemanjai, jsji, PowerPC.
Herald added subscribers: kbarton, hiraditya.
shchenz requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This fixes an internal crash caused by D106555 <https://reviews.llvm.org/D106555> on the 32-bit AIX target for v16i8/v8i16 splat load lowering.

`(INSERT_SUBREG (i64 (IMPLICIT_DEF)), (LHZX ForceXForm:$A), sub_32)` causes an assertion later:

  Assertion failed: RC && "This value type is not natively supported!", file  /home/czhengsz/llvm/dev/llvm-project/llvm/include/llvm/CodeGen/TargetLowering.h, line 863, virtual const llvm::TargetRegisterClass *llvm::TargetLoweringBase::getRegClassFor(llvm::MVT, bool) const() 

@nemanjai suggested using `MTVSRWZ` instead of `MTVSRD` in the post-commit review of D106555 <https://reviews.llvm.org/D106555>, this can also avoid the `INSERT_SUBREG`, so it can solve the crash on 32-bit AIX.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113236

Files:
  llvm/lib/Target/PowerPC/PPCInstrVSX.td
  llvm/test/CodeGen/PowerPC/canonical-merge-shuffles.ll
  llvm/test/CodeGen/PowerPC/load-and-splat.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113236.384947.patch
Type: text/x-patch
Size: 21728 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211105/8205fd91/attachment.bin>


More information about the llvm-commits mailing list