This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] use correct selection for v16i8/v8i16 splat load
ClosedPublic

Authored by shchenz on Nov 4 2021, 8:30 PM.

Details

Summary

This fixes an internal crash caused by 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, this can also avoid the INSERT_SUBREG, so it can solve the crash on 32-bit AIX.

Diff Detail

Event Timeline

shchenz created this revision.Nov 4 2021, 8:30 PM
shchenz requested review of this revision.Nov 4 2021, 8:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2021, 8:30 PM
nemanjai accepted this revision.Nov 5 2021, 2:20 AM

LGTM. Thanks for fixing this.

This revision is now accepted and ready to land.Nov 5 2021, 2:20 AM
This revision was landed with ongoing or failed builds.Nov 5 2021, 3:04 AM
This revision was automatically updated to reflect the committed changes.