[PATCH] D123521: [PowerPC] Legalize masked gather/scatter intrinsics

Zaara Syeda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 09:55:23 PDT 2022


syzaara created this revision.
syzaara added reviewers: nemanjai, stefanp, lei.
Herald added subscribers: steven.zhang, shchenz, kbarton, hiraditya.
Herald added a project: All.
syzaara requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch experimentally enables the gather/scatter intrinsics for PowerPC to catch more LoopVectorize and SLPVectorize opportunities.
Both LoopVectorize and SLPVectorize call a query called isLegalMaskedGather. By setting this to true, we can enable more vectorization. We currently do not have any lowering for these instrinsics, so this patch also sets the hook forceScalarizeMaskedGather to true. The pass ScalarizeMaskedMemIntrin will then lower the intrinsic by scalarizing it. The next steps will be to implement more optimal lowering rather than relying on ScalarizeMaskedMemIntrin.


https://reviews.llvm.org/D123521

Files:
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
  llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h
  llvm/test/Transforms/LoopVectorize/PowerPC/vectorize-masked-gather.ll
  llvm/test/Transforms/LoopVectorize/PowerPC/vectorize-masked-scatter.ll
  llvm/test/Transforms/SLPVectorizer/PowerPC/slp-masked-gather.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123521.421947.patch
Type: text/x-patch
Size: 12246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220411/d65557a7/attachment.bin>


More information about the llvm-commits mailing list