aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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
+}
+