[PATCH] D135876: [InstCombine] Remove redundant splats in InstCombineVectorOps

Matt Devereau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 20 12:55:25 PDT 2022


MattDevereau updated this revision to Diff 469326.
MattDevereau retitled this revision from "[Instcombine] Scalarize vscale splats of vectorized BinOps" to "[InstCombine] Remove redundant splats in InstCombineVectorOps".
MattDevereau edited the summary of this revision.
MattDevereau added a comment.

I've made the combine more generic to only remove the redundant BinOp splats. The vscale tests added in previous revisions did not benefit from this change, and so I've removed them. The original vscale case where redundant splats weren't being removed has been resolved by this change, as VectorCombine recognizes it can change the vector BinOps to scalar BinOps once the shuffles have been removed and only InsertElt's remain in their place. I believe the newly added tests from the discussion on this review provide sufficient coverage.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135876/new/

https://reviews.llvm.org/D135876

Files:
  llvm/lib/Transforms/InstCombine/InstCombineInternal.h
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/test/Transforms/InstCombine/vscale-insert-shuffle-binop.ll
  llvm/test/Transforms/VectorCombine/AArch64/insert-shuffle-binop.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135876.469326.patch
Type: text/x-patch
Size: 24360 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221020/3bb577b3/attachment.bin>


More information about the llvm-commits mailing list