[PATCH] D115526: [InstCombine] don't automatically drop poison-generating flags in SimplifyVectorDemandedElts

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 10 08:00:43 PST 2021


spatel created this revision.
spatel added reviewers: reames, nlopes, lebedev.ri, nikic, craig.topper, efriedma.
Herald added subscribers: hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

I noticed this while reviewing the test diffs in D115460 <https://reviews.llvm.org/D115460> (and so the diffs in that patch will be reduced if this one is applied first).

This is effectively a revert of 3436dc29239d - since that commit, we've made several enhancements, so the reasoning there is no longer valid. Specifically, we added a poison value to IR, and we clarified the behavior of undef/poison elements in a shuffle mask:
https://llvm.org/docs/LangRef.html#shufflevector-instruction

Alive2 seems to agree that the propagation of flags in the test diffs shown here are valid:
https://alive2.llvm.org/ce/z/UuY-jr
https://alive2.llvm.org/ce/z/GXoMD9
https://alive2.llvm.org/ce/z/nVCyVH


https://reviews.llvm.org/D115526

Files:
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  llvm/test/Transforms/InstCombine/X86/x86-muldq-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-muldq.ll
  llvm/test/Transforms/InstCombine/shuffle_select-inseltpoison.ll
  llvm/test/Transforms/InstCombine/shuffle_select.ll
  llvm/test/Transforms/InstCombine/vec_demanded_elts-inseltpoison.ll
  llvm/test/Transforms/InstCombine/vec_demanded_elts.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115526.393488.patch
Type: text/x-patch
Size: 7101 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211210/9c70ba5f/attachment.bin>


More information about the llvm-commits mailing list