[PATCH] Fold EXTRACT_VECTOR_ELT(BUILD_VECTOR(Elt[0], ...), CstX ) -> Elt[CstX]

Mehdi AMINI mehdi.amini at apple.com
Sat Apr 18 01:06:18 PDT 2015


Add a new DAG combine to fold EXTRACT_VECTOR_ELT through BUILD_VECTOR.
It breaks one ARM test, but I believe it canonicalizes the test in
a different way and the DAG should be updated to handle it. Added
another variant of the test, conceptually identical but which was
failing before this patch. CC:
- Tim to have a look at the AArch64 test change, I hope it is legal.
- Tom/Matt for the R600 test changes.

http://reviews.llvm.org/D9094

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/fold-constants.ll
  test/CodeGen/ARM/big-endian-vector-callee.ll
  test/CodeGen/ARM/big-endian-vector-caller.ll
  test/CodeGen/ARM/vmov.ll
  test/CodeGen/R600/ds_read2.ll
  test/CodeGen/R600/fceil64.ll
  test/CodeGen/R600/ftrunc.f64.ll
  test/CodeGen/R600/gep-address-space.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9094.23987.patch
Type: text/x-patch
Size: 20528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150418/d5cb278a/attachment.bin>


More information about the llvm-commits mailing list