diff options
-rw-r--r-- | test/Transforms/ScalarRepl/union-pointer.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/ScalarRepl/union-pointer.ll b/test/Transforms/ScalarRepl/union-pointer.ll new file mode 100644 index 0000000000..427ceec958 --- /dev/null +++ b/test/Transforms/ScalarRepl/union-pointer.ll @@ -0,0 +1,18 @@ + +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | not grep alloca && +; RUN: llvm-as < %s | opt -scalarrepl | llvm-dis | grep 'ret sbyte' + +target endian = little +target pointersize = 32 +target triple = "i686-apple-darwin8.7.2" + +implementation ; Functions: + +sbyte* %test(short* %X) { + %X_addr = alloca short* + store short* %X, short** %X_addr + %X_addr = cast short** %X_addr to sbyte** + %tmp = load sbyte** %X_addr + ret sbyte* %tmp +} + |