summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-03-30 15:10:18 +0000
committerHal Finkel <hfinkel@anl.gov>2014-03-30 15:10:18 +0000
commit111bcf9b5960a0e4687b93d2b79df01e5d760b12 (patch)
tree9f99496d78cf734da3d19eb3f2000a0f30de9ae0 /test/CodeGen/PowerPC
parent2afefa27b354174a9c60ab0b369731f3de922013 (diff)
downloadllvm-111bcf9b5960a0e4687b93d2b79df01e5d760b12.tar.gz
llvm-111bcf9b5960a0e4687b93d2b79df01e5d760b12.tar.bz2
llvm-111bcf9b5960a0e4687b93d2b79df01e5d760b12.tar.xz
Make use of previously generated stores in SelectionDAGLegalize::ExpandExtractFromVectorThroughStack
When expanding EXTRACT_VECTOR_ELT and EXTRACT_SUBVECTOR using SelectionDAGLegalize::ExpandExtractFromVectorThroughStack, we store the entire vector and then load the piece we want. This is fine in isolation, but generating a new store (and corresponding stack slot) for each extraction ends up producing code of poor quality. When we scalarize a vector operation (using SelectionDAG::UnrollVectorOp for example) we generate one EXTRACT_VECTOR_ELT for each element in the vector. This used to generate one stored copy of the vector for each element in the vector. Now we search the uses of the vector for a suitable store before generating a new one, which results in much more efficient scalarization code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC')
-rw-r--r--test/CodeGen/PowerPC/vsx.ll6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/vsx.ll b/test/CodeGen/PowerPC/vsx.ll
index 99796a9cd7..d0ff0f2829 100644
--- a/test/CodeGen/PowerPC/vsx.ll
+++ b/test/CodeGen/PowerPC/vsx.ll
@@ -281,6 +281,12 @@ define <2 x i64> @test26(<2 x i64> %a, <2 x i64> %b) {
ret <2 x i64> %v
; CHECK-LABEL: @test26
+
+; Make sure we use only two stores (one for each operand).
+; CHECK: stxvd2x 35,
+; CHECK: stxvd2x 34,
+; CHECK-NOT: stxvd2x
+
; FIXME: The code quality here is not good; just make sure we do something for now.
; CHECK: add
; CHECK: add