This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Add default handling for single element vectors, and split/promote vNi1 vectors.
ClosedPublic

Authored by amyk on Feb 10 2022, 10:13 PM.

Details

Summary

This patch updates the handling of vectors in getPreferredVectorAction():

  • For single-element and scalable vectors, fall back to default vector legalization handling.
  • For vNi1 vectors, add handling to either split or promote them in order to prevent the production of wide v256i1/v512i1 types.

The following assertion is fixed by this patch, as we ended up producing the wide vector types
(that are used for MMA) in the backend prior to this fix.

Assertion failed: VT.getSizeInBits() == Operand.getValueSizeInBits() && "Cannot BITCAST between types of different sizes!", file  /home/amyk/llvm/Community/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp, line 5138, llvm::SDValue llvm::SelectionDAG::getNode(unsigned int, const llvm::SDLoc &, llvm::EVT, llvm::SDValue, const llvm::SDNodeFlags)()

Diff Detail

Unit TestsFailed

Event Timeline

amyk created this revision.Feb 10 2022, 10:13 PM
amyk requested review of this revision.Feb 10 2022, 10:13 PM
nemanjai accepted this revision.Feb 11 2022, 7:59 AM

LGTM.

This revision is now accepted and ready to land.Feb 11 2022, 7:59 AM
quinnp accepted this revision.Feb 11 2022, 9:35 AM

lgtm

This revision was landed with ongoing or failed builds.Feb 15 2022, 6:44 AM
This revision was automatically updated to reflect the committed changes.