summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-03 01:30:09 +0000
committerChris Lattner <sabre@nondot.org>2009-02-03 01:30:09 +0000
commit09b65ab288779be19b37f5caaec30a6f2fe023d4 (patch)
treebbc83c66a6be5b1403f706467e569abee067c34a /llvm/test
parentfb306c0a10ecdaf6b4f5044b768b2470cd5af76e (diff)
downloadbcm5719-llvm-09b65ab288779be19b37f5caaec30a6f2fe023d4.tar.gz
bcm5719-llvm-09b65ab288779be19b37f5caaec30a6f2fe023d4.zip
rearrange how SRoA handles promotion of allocas to vectors.
With the new world order, it can handle cases where the first store into the alloca is an element of the vector, instead of requiring the first analyzed store to have the vector type itself. This allows us to un-xfail test/CodeGen/X86/vec_ins_extract.ll. llvm-svn: 63590
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/CodeGen/X86/vec_ins_extract.ll1
-rw-r--r--llvm/test/Transforms/ScalarRepl/vector_promote.ll10
2 files changed, 10 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/vec_ins_extract.ll b/llvm/test/CodeGen/X86/vec_ins_extract.ll
index 6f6c977db64..86f13069de2 100644
--- a/llvm/test/CodeGen/X86/vec_ins_extract.ll
+++ b/llvm/test/CodeGen/X86/vec_ins_extract.ll
@@ -1,6 +1,5 @@
; RUN: llvm-as < %s | opt -scalarrepl -instcombine | \
; RUN: llc -march=x86 -mcpu=yonah | not grep sub.*esp
-; XFAIL: *
; This checks that various insert/extract idiom work without going to the
; stack.
diff --git a/llvm/test/Transforms/ScalarRepl/vector_promote.ll b/llvm/test/Transforms/ScalarRepl/vector_promote.ll
index d1d11e22936..a0d331719f0 100644
--- a/llvm/test/Transforms/ScalarRepl/vector_promote.ll
+++ b/llvm/test/Transforms/ScalarRepl/vector_promote.ll
@@ -52,3 +52,13 @@ entry:
store float %tmp.upgrd.6, float* %f
ret void
}
+
+define i32 @test5(float %X) { ;; should turn into bitcast.
+ %X_addr = alloca [4 x float]
+ %X1 = getelementptr [4 x float]* %X_addr, i32 0, i32 2
+ store float %X, float* %X1
+ %a = bitcast float* %X1 to i32*
+ %tmp = load i32* %a
+ ret i32 %tmp
+}
+
OpenPOWER on IntegriCloud