summaryrefslogtreecommitdiff
path: root/CREDITS.TXT
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2014-04-18 19:44:16 +0000
committerAdam Nemet <anemet@apple.com>2014-04-18 19:44:16 +0000
commitd290fa608fe090903f306c10d27a0e181fe6fb3b (patch)
tree0d6e0bb55db79ef042542587916798448223facf /CREDITS.TXT
parent842c27189a7a6c698d10da84d483627da1da0c1d (diff)
downloadllvm-d290fa608fe090903f306c10d27a0e181fe6fb3b.tar.gz
llvm-d290fa608fe090903f306c10d27a0e181fe6fb3b.tar.bz2
llvm-d290fa608fe090903f306c10d27a0e181fe6fb3b.tar.xz
[X86] Improve buildFromShuffleMostly for AVX
For a 256-bit BUILD_VECTOR consisting mostly of shuffles of 256-bit vectors, both the BUILD_VECTOR and its operands may need to be legalized in multiple steps. Consider: (v8f32 (BUILD_VECTOR (extract_vector_elt (v8f32 %vreg0,) Constant<1>), (extract_vector_elt %vreg0, Constant<2>), (extract_vector_elt %vreg0, Constant<3>), (extract_vector_elt %vreg0, Constant<4>), (extract_vector_elt %vreg0, Constant<5>), (extract_vector_elt %vreg0, Constant<6>), (extract_vector_elt %vreg0, Constant<7>), %vreg1)) a. We can't build a 256-bit vector efficiently so, we need to split it into two 128-bit vecs and combine them with VINSERTX128. b. Operands like (extract_vector_elt (v8f32 %vreg0), Constant<7>) needs to be split into a VEXTRACTX128 and a further extract_vector_elt from the resulting 128-bit vector. c. The extract_vector_elt from b. is lowered into a shuffle to the first element and a movss. Depending on the order in which we legalize the BUILD_VECTOR and its operands[1], buildFromShuffleMostly may be faced with: (v4f32 (BUILD_VECTOR (extract_vector_elt (vector_shuffle<1,u,u,u> (extract_subvector %vreg0, Constant<4>), undef), Constant<0>), (extract_vector_elt (vector_shuffle<2,u,u,u> (extract_subvector %vreg0, Constant<4>), undef), Constant<0>), (extract_vector_elt (vector_shuffle<3,u,u,u> (extract_subvector %vreg0, Constant<4>), undef), Constant<0>), %vreg1)) In order to figure out the underlying vector and their identity we need to see through the shuffles. [1] Note that the order in which operations and their operands are legalized is only guaranteed in the first iteration of LegalizeDAG. Fixes <rdar://problem/16296956> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206634 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CREDITS.TXT')
0 files changed, 0 insertions, 0 deletions