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

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 10 22:13:09 PST 2022


amyk created this revision.
amyk added reviewers: PowerPC, nemanjai, quinnp, lei.
amyk added projects: LLVM, PowerPC.
Herald added subscribers: shchenz, kbarton, hiraditya.
amyk requested review of this revision.
Herald added a subscriber: alextsao1999.

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)()


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119521

Files:
  llvm/lib/Target/PowerPC/PPCISelLowering.h
  llvm/test/CodeGen/PowerPC/p10-handle-split-promote-vec.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119521.407773.patch
Type: text/x-patch
Size: 10339 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220211/4b459ba4/attachment.bin>


More information about the llvm-commits mailing list