[PATCH] D113900: [PowerPC] Prevent the optimizer from producing wide vector types in IR.

Amy Kwan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 07:34:20 PST 2021


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

This patch prevents the optimizer from producing wide vectors in the IR, specifically the
MMA types (v256i1, v512i1). The idea is that on Power, we only want to be producing
these types only if the vector_pair and vector_quad types are used specifically.

To prevent the optimizer from producing these types in the IR, a check is made for
if the current type is that of an MMA type and if this check succeeds, the maximum
instruction cost is returned to inform the optimizer that producing these types within
the IR is expensive, and should not be produced in the first place.

This issue was first seen in the test case included within this patch.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113900

Files:
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  llvm/test/Transforms/PGOProfile/ppc-prevent-mma-types.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113900.387007.patch
Type: text/x-patch
Size: 13580 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211115/ec23c621/attachment.bin>


More information about the llvm-commits mailing list