new testcase
authorChris Lattner <sabre@nondot.org>
Sun, 10 Dec 2006 23:52:28 +0000 (23:52 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 10 Dec 2006 23:52:28 +0000 (23:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32417 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/ScalarRepl/union-fp-int.ll [new file with mode: 0644]

diff --git a/test/Transforms/ScalarRepl/union-fp-int.ll b/test/Transforms/ScalarRepl/union-fp-int.ll
new file mode 100644 (file)
index 0000000..9c0e23e
--- /dev/null
@@ -0,0 +1,10 @@
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'bitcast.*float.*int'
+
+int %test(float %X) {
+        %X_addr = alloca float
+        store float %X, float* %X_addr
+        %X_addr = bitcast float* %X_addr to int*
+        %tmp = load int* %X_addr
+        ret int %tmp
+}