aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ScalarRepl
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-03 19:30:11 +0000
committerChris Lattner <sabre@nondot.org>2009-02-03 19:30:11 +0000
commit9b872db775797dea4b391a9347cfbd2ca9c558e2 (patch)
tree9026ef0ba19bfc7fc56b05ffc8c76090976c71f0 /test/Transforms/ScalarRepl
parent43f07fb6c3e3d775d8e5f1eaeb380b93bb3bc09d (diff)
downloadexternal_llvm-9b872db775797dea4b391a9347cfbd2ca9c558e2.zip
external_llvm-9b872db775797dea4b391a9347cfbd2ca9c558e2.tar.gz
external_llvm-9b872db775797dea4b391a9347cfbd2ca9c558e2.tar.bz2
make scalar conversion handle stores of first class
aggregate values. loads are not yet handled (coming soon to an sroa near you). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63649 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ScalarRepl')
-rw-r--r--test/Transforms/ScalarRepl/sroa-fca.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/ScalarRepl/sroa-fca.ll b/test/Transforms/ScalarRepl/sroa-fca.ll
new file mode 100644
index 0000000..a7ec3a1
--- /dev/null
+++ b/test/Transforms/ScalarRepl/sroa-fca.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis
+; Make sure that SROA "scalar conversion" can handle first class aggregates.
+
+define i64 @test({i32, i32} %A) {
+ %X = alloca i64
+ %Y = bitcast i64* %X to {i32,i32}*
+ store {i32,i32} %A, {i32,i32}* %Y
+
+ %Q = load i64* %X
+ ret i64 %Q
+}
+