diff options
-rw-r--r-- | test/Transforms/ScalarRepl/union-fp-int.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/ScalarRepl/union-fp-int.ll b/test/Transforms/ScalarRepl/union-fp-int.ll new file mode 100644 index 0000000000..9c0e23e8a6 --- /dev/null +++ b/test/Transforms/ScalarRepl/union-fp-int.ll @@ -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 +} |