mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 07:09:08 +00:00
new testcase for SROA for stuff like "union { int*, float* }".
llvm-svn: 30822
This commit is contained in:
parent
b0e0a23959
commit
724ebf87a0
18
test/Regression/Transforms/ScalarRepl/union-pointer.ll
Normal file
18
test/Regression/Transforms/ScalarRepl/union-pointer.ll
Normal file
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user