[PATCH] D100122: Update m_Undef to match vectors/aggrs with undefs and poisons mixed

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 09:09:19 PDT 2021


aqjune created this revision.
aqjune added reviewers: lebedev.ri, nikic, spatel.
Herald added subscribers: dexonsmith, hiraditya.
aqjune requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is an alternative approach to fixing https://reviews.llvm.org/D93990#2666922
by teaching `m_Undef` to match vectors/aggrs with poison elements instead of hard-coding
it at `SimplifyQuery::isUndefValue` (D99853 <https://reviews.llvm.org/D99853>).

This patch also contains fixes in InstCombine files to use the `m_Undef` matcher instead
of `isa<UndefValue>`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100122

Files:
  llvm/include/llvm/Analysis/InstructionSimplify.h
  llvm/include/llvm/IR/PatternMatch.h
  llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
  llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
  llvm/test/Transforms/InstCombine/vec_shuffle-inseltpoison.ll
  llvm/test/Transforms/InstSimplify/icmp-constant.ll
  llvm/test/Transforms/PhaseOrdering/X86/scalarization.ll
  llvm/test/Transforms/SLPVectorizer/X86/alternate-int.ll
  llvm/unittests/IR/PatternMatch.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100122.336143.patch
Type: text/x-patch
Size: 17315 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210408/03204363/attachment.bin>


More information about the llvm-commits mailing list