summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-06-07 06:52:44 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-06-07 06:52:44 +0000
commit3234587213b624e90581208794a17ebfab575a33 (patch)
treef9e495f17b9ba8594a6c6d3e80beea42e55e7be5 /llvm/test
parentcc1305899874dbc4349314684b75235ed25309a2 (diff)
downloadbcm5719-llvm-3234587213b624e90581208794a17ebfab575a33.tar.gz
bcm5719-llvm-3234587213b624e90581208794a17ebfab575a33.zip
Slightly generalize the code that handles shuffles of consecutive loads
on x86 to handle more cases. Fix a bug in said code that would cause it to read past the end of an object. Rewrite the code in SelectionDAGLegalize::ExpandBUILD_VECTOR to be a bit more general. Remove PerformBuildVectorCombine, which is no longer necessary with these changes. In addition to simplifying the code, with this change, we can now catch a few more cases of consecutive loads. llvm-svn: 73012
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/vec_loadsingles.ll12
-rw-r--r--llvm/test/CodeGen/X86/vec_set-5.ll3
-rw-r--r--llvm/test/CodeGen/X86/vec_set-6.ll2
3 files changed, 14 insertions, 3 deletions
diff --git a/llvm/test/CodeGen/X86/vec_loadsingles.ll b/llvm/test/CodeGen/X86/vec_loadsingles.ll
new file mode 100644
index 00000000000..67122763ec9
--- /dev/null
+++ b/llvm/test/CodeGen/X86/vec_loadsingles.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movq
+
+define <4 x float> @a(<4 x float> %a, float* nocapture %p) nounwind readonly {
+entry:
+ %tmp1 = load float* %p
+ %vecins = insertelement <4 x float> undef, float %tmp1, i32 0
+ %add.ptr = getelementptr float* %p, i32 1
+ %tmp5 = load float* %add.ptr
+ %vecins7 = insertelement <4 x float> %vecins, float %tmp5, i32 1
+ ret <4 x float> %vecins7
+}
+
diff --git a/llvm/test/CodeGen/X86/vec_set-5.ll b/llvm/test/CodeGen/X86/vec_set-5.ll
index 4fc652c022a..d3329701119 100644
--- a/llvm/test/CodeGen/X86/vec_set-5.ll
+++ b/llvm/test/CodeGen/X86/vec_set-5.ll
@@ -1,7 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
; RUN: grep movlhps %t | count 1
-; RUN: grep movq %t | count 1
-; RUN: grep movsd %t | count 1
+; RUN: grep movq %t | count 2
define <4 x float> @test1(float %a, float %b) nounwind {
%tmp = insertelement <4 x float> zeroinitializer, float %a, i32 0 ; <<4 x float>> [#uses=1]
diff --git a/llvm/test/CodeGen/X86/vec_set-6.ll b/llvm/test/CodeGen/X86/vec_set-6.ll
index 02df526cee8..c7b6747a86f 100644
--- a/llvm/test/CodeGen/X86/vec_set-6.ll
+++ b/llvm/test/CodeGen/X86/vec_set-6.ll
@@ -1,6 +1,6 @@
; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -o %t -f
; RUN: grep movss %t | count 1
-; RUN: grep movups %t | count 1
+; RUN: grep movq %t | count 1
; RUN: grep shufps %t | count 1
define <4 x float> @test(float %a, float %b, float %c) nounwind {
OpenPOWER on IntegriCloud