diff options
author | Chris Lattner <sabre@nondot.org> | 2006-10-08 23:27:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-10-08 23:27:37 +0000 |
commit | fc1dfd413734bcaf6e49791ba20bfe5c094b8d5a (patch) | |
tree | 3c54486b2ed4911b69012cd9464d095f38d32d70 /test/Transforms/ScalarRepl/union-pointer.ll | |
parent | 6270f686b323281aa6774d019413a52696337ff2 (diff) |
new testcase for SROA for stuff like "union { int*, float* }".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30822 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/ScalarRepl/union-pointer.ll')
-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 +} + |