It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Transforms/ScalarRepl/union-fp-int.ll b/test/Transforms/ScalarRepl/union-fp-int.ll
new file mode 100644
index 0000000..c8eaeea
--- /dev/null
+++ b/test/Transforms/ScalarRepl/union-fp-int.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
+; RUN:   not grep alloca
+; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | \
+; RUN:   grep {bitcast.*float.*i32}
+
+implementation
+
+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
+}