[PATCH] D150039: [InstCombine] Update instcombine for vectorOps to use new shufflevector semantics

Manuel Brito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 6 06:43:14 PDT 2023


ManuelJBrito created this revision.
ManuelJBrito added reviewers: nlopes, spatel, efriedma, nikic.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
ManuelJBrito requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

This patch updates the transformations in InstCombineVectorOps to use the new shufflevector semantics that say that undefined values in the mask yield poison.

To prevent miscompilations we have to match with m_Poison instead of m_Undef. Otherwise, we might introduce poison where there was previously undef.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150039

Files:
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/test/Transforms/InstCombine/broadcast.ll
  llvm/test/Transforms/InstCombine/vec_shuffle-inseltpoison.ll
  llvm/test/Transforms/InstCombine/vec_shuffle.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr49081.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150039.520083.patch
Type: text/x-patch
Size: 9295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230506/efd08c5e/attachment.bin>


More information about the llvm-commits mailing list