mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
eacb7020ec
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
29 lines
879 B
LLVM
29 lines
879 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 | grep 'A(' | wc -l | grep 1
|
|
;
|
|
; Make sure the common loop invariant _A(reg) is hoisted up to preheader.
|
|
|
|
%A = internal global [16 x [16 x int]] zeroinitializer, align 32
|
|
|
|
void %test(int %row, int %N.in) {
|
|
entry:
|
|
%N = cast int %N.in to uint
|
|
%tmp5 = setgt int %N.in, 0
|
|
br bool %tmp5, label %cond_true, label %return
|
|
|
|
cond_true:
|
|
%indvar = phi uint [ 0, %entry ], [ %indvar.next, %cond_true ]
|
|
%i.0.0 = cast uint %indvar to int
|
|
%tmp2 = add int %i.0.0, 1
|
|
%tmp = getelementptr [16 x [16 x int]]* %A, int 0, int %row, int %tmp2
|
|
store int 4, int* %tmp
|
|
%tmp5 = add int %i.0.0, 2
|
|
%tmp7 = getelementptr [16 x [16 x int]]* %A, int 0, int %row, int %tmp5
|
|
store int 5, int* %tmp7
|
|
%indvar.next = add uint %indvar, 1
|
|
%exitcond = seteq uint %indvar.next, %N
|
|
br bool %exitcond, label %return, label %cond_true
|
|
|
|
return:
|
|
ret void
|
|
}
|