llvm-6502/test/Transforms/ScalarRepl/union-pointer.ll
Reid Spencer eacb7020ec For PR950:
Update the test suite to accommodate the change from signed integer types
to signless integer types. The changes were of only a few kinds:

1. Make sure llvm-upgrade is run on the source which does the bulk of the
   changes automatically.

2. Change things like "grep 'int'" to "grep 'i32'"

3. In several tests bitcasting caused the same name to be reused in the
   same type plane. These had to be manually fixed. The fix was (generally)
   to leave the bitcast and provide the instruction with a new name. This
   should not affect the semantics of the test. In a few cases, the
   bitcasts were known to be superfluous and irrelevant to the test case
   so they were removed.

4. One test case uses a bytecode file which needed to be updated to the
   latest bytecode format.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32789 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 06:02:00 +00:00

47 lines
1.6 KiB
LLVM

; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | not grep alloca &&
; RUN: llvm-upgrade < %s | llvm-as | opt -scalarrepl | llvm-dis | grep 'ret i8'
; PR892
target endian = little
target pointersize = 32
target triple = "i686-apple-darwin8.7.2"
%struct.Val = type { int*, int }
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
}
void %test2(long %Op.0) {
%tmp = alloca %struct.Val, align 8
%tmp1 = alloca %struct.Val, align 8
%tmp = call ulong %_Z3foov( )
%tmp1 = cast %struct.Val* %tmp1 to ulong*
store ulong %tmp, ulong* %tmp1
%tmp = getelementptr %struct.Val* %tmp, int 0, uint 0
%tmp2 = getelementptr %struct.Val* %tmp1, int 0, uint 0
%tmp = load int** %tmp2
store int* %tmp, int** %tmp
%tmp3 = getelementptr %struct.Val* %tmp, int 0, uint 1
%tmp4 = getelementptr %struct.Val* %tmp1, int 0, uint 1
%tmp = load int* %tmp4
store int %tmp, int* %tmp3
%tmp7 = cast %struct.Val* %tmp to { long }*
%tmp8 = getelementptr { long }* %tmp7, int 0, uint 0
%tmp9 = load long* %tmp8
call void %_Z3bar3ValS_( long %Op.0, long %tmp9 )
ret void
}
declare ulong %_Z3foov()
declare void %_Z3bar3ValS_(long, long)