[PATCH] D49262: [DAGCombiner] Call SimplifyDemandedVectorElts from EXTRACT_VECTOR_ELT

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 11:41:14 PDT 2018


RKSimon created this revision.
RKSimon added reviewers: spatel, efriedma, uweigand, t.p.northover, arsenm, bogner.
Herald added subscribers: nhaehnle, wdng.
Herald added a reviewer: javed.absar.

If we are only using one vector element via a EXTRACT_VECTOR_ELT we may be able to use SimplifyDemandedVectorElts to avoid unnecessary vector ops.

TODO: If a vector has multiple uses, it might be interesting to see if all of them are EXTRACT_VECTOR_ELT and accumulate a demanded mask accordingly.


Repository:
  rL LLVM

https://reviews.llvm.org/D49262

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/aarch64-be-bv.ll
  test/CodeGen/AMDGPU/indirect-addressing-si.ll
  test/CodeGen/ARM/func-argpassing-endian.ll
  test/CodeGen/SystemZ/vec-combine-01.ll
  test/CodeGen/X86/dagcombine-cse.ll
  test/CodeGen/X86/extractelement-load.ll
  test/CodeGen/X86/known-bits-vector.ll
  test/CodeGen/X86/oddshuffles.ll
  test/CodeGen/X86/scalar_widen_div.ll
  test/CodeGen/X86/vec_shift7.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49262.155238.patch
Type: text/x-patch
Size: 35041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180712/32e77b94/attachment-0001.bin>


More information about the llvm-commits mailing list