aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/ConstProp/loads.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-10-23 06:57:37 +0000
committerChris Lattner <sabre@nondot.org>2009-10-23 06:57:37 +0000
commit17f0cd3cc1432231f2bc5601e7e463986a59d817 (patch)
tree3281e0056f828380884e59e2dfdb0a7c1dbf9fec /test/Transforms/ConstProp/loads.ll
parent739208a790398cf1f9da05149c768371e48781e8 (diff)
teach libanalysis to simplify vector loads with bitcast sources. This
implements something out of Target/README.txt producing: _foo: ## @foo movl 4(%esp), %eax movapd LCPI1_0, %xmm0 movapd %xmm0, (%eax) ret $4 instead of: _foo: ## @foo movl 4(%esp), %eax movapd _b, %xmm0 mulpd LCPI1_0, %xmm0 addpd _a, %xmm0 movapd %xmm0, (%eax) ret $4 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ConstProp/loads.ll')
-rw-r--r--test/Transforms/ConstProp/loads.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/loads.ll b/test/Transforms/ConstProp/loads.ll
index 3096ed347c..f3e7f6a4b7 100644
--- a/test/Transforms/ConstProp/loads.ll
+++ b/test/Transforms/ConstProp/loads.ll
@@ -77,3 +77,13 @@ define i128 @test9() {
; @test9
; CHECK: ret i128 112312312
}
+
+; vector load.
+define <2 x i64> @test10() {
+ %r = load <2 x i64>* bitcast({i64, i64}* @test3 to <2 x i64>*)
+ ret <2 x i64> %r
+
+; @test10
+; CHECK: ret <2 x i64> <i64 112312312, i64 0>
+}
+