[PATCH] D115394: [instcombine] Do demanded elts last when visiting extractelement

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 8 13:33:07 PST 2021


reames created this revision.
reames added reviewers: nikic, lifted, craig.topper, spatel.
Herald added subscribers: bollu, hiraditya, mcrosier.
reames requested review of this revision.
Herald added a project: LLVM.

This reorders existing transforms to put demanded elements last.  The reasoning here is that when we have an example which can be scalarized or handled via demanded bits, we should prefer scalarization as that doesn't require dropping flags on arithmetic instructions.

This doesn't show major changes in the tests today, but once I add support for fast math flags to dropPoisonGeneratingFlags this becomes glaringly obvious.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D115394

Files:
  llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
  llvm/test/Transforms/InstCombine/X86/x86-avx512-inseltpoison.ll
  llvm/test/Transforms/InstCombine/X86/x86-avx512.ll
  llvm/test/Transforms/InstCombine/X86/x86-fma.ll
  llvm/test/Transforms/InstCombine/scalarization-inseltpoison.ll
  llvm/test/Transforms/InstCombine/scalarization.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115394.392916.patch
Type: text/x-patch
Size: 14335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211208/800d18a8/attachment.bin>


More information about the llvm-commits mailing list