[PATCH] [CodeGen] Combine concat_vectors of scalars into build_vector.

Ahmed Bougacha ahmed.bougacha at gmail.com
Thu Apr 9 18:29:12 PDT 2015


Hi RKSimon, chandlerc,

Replaces D8884 and D8885, which focused on the wrong issue.

Combine something like:
    (v8i8 concat_vectors (v2i8 bitcast (i16)) x4)
into:
    (v8i8 (bitcast (v4i16 BUILD_VECTOR (i16) x4)))

Only when the concatenated vector type isn't legal.  Also, I'm not sure if the bitcast to an integer scalar (rather than something smarter, say picking FP if all scalars are FP) is an issue?

http://reviews.llvm.org/D8948

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/AArch64/concat_vector-scalar-combine.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8948.23553.patch
Type: text/x-patch
Size: 6077 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150410/45ec1e0b/attachment.bin>


More information about the llvm-commits mailing list