xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/largeimmprinting.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel -relocation-model=pic < %s | FileCheck %s -check-prefix=32
2*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mips64el -mcpu=mips4 -target-abi=n64 -relocation-model=pic < %s | \
3*9880d681SAndroid Build Coastguard Worker; RUN:     FileCheck %s -check-prefix=64
4*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mips64el -mcpu=mips64 -target-abi=n64 -relocation-model=pic < %s | \
5*9880d681SAndroid Build Coastguard Worker; RUN:     FileCheck %s -check-prefix=64
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker%struct.S1 = type { [65536 x i8] }
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker@s1 = external global %struct.S1
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Workerdefine void @f() nounwind {
12*9880d681SAndroid Build Coastguard Workerentry:
13*9880d681SAndroid Build Coastguard Worker; 32:  lui     $[[R0:[0-9]+]], 1
14*9880d681SAndroid Build Coastguard Worker; 32:  addiu   $[[R0]], $[[R0]], 24
15*9880d681SAndroid Build Coastguard Worker; 32:  subu    $sp, $sp, $[[R0]]
16*9880d681SAndroid Build Coastguard Worker; 32:  lui     $[[R1:[0-9]+]], 1
17*9880d681SAndroid Build Coastguard Worker; 32:  addu    $[[R1]], $sp, $[[R1]]
18*9880d681SAndroid Build Coastguard Worker; 32:  sw      $ra, 20($[[R1]])
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker; 64:  lui     $[[R0:[0-9]+]], 1
21*9880d681SAndroid Build Coastguard Worker; 64:  daddiu  $[[R0]], $[[R0]], 32
22*9880d681SAndroid Build Coastguard Worker; 64:  dsubu   $sp, $sp, $[[R0]]
23*9880d681SAndroid Build Coastguard Worker; 64:  lui     $[[R1:[0-9]+]], 1
24*9880d681SAndroid Build Coastguard Worker; 64:  daddu   $[[R1]], $sp, $[[R1]]
25*9880d681SAndroid Build Coastguard Worker; 64:  sd      $ra, 24($[[R1]])
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker  %agg.tmp = alloca %struct.S1, align 1
28*9880d681SAndroid Build Coastguard Worker  %tmp = getelementptr inbounds %struct.S1, %struct.S1* %agg.tmp, i32 0, i32 0, i32 0
29*9880d681SAndroid Build Coastguard Worker  call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* getelementptr inbounds (%struct.S1, %struct.S1* @s1, i32 0, i32 0, i32 0), i32 65536, i32 1, i1 false)
30*9880d681SAndroid Build Coastguard Worker  call void @f2(%struct.S1* byval %agg.tmp) nounwind
31*9880d681SAndroid Build Coastguard Worker  ret void
32*9880d681SAndroid Build Coastguard Worker}
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard Workerdeclare void @f2(%struct.S1* byval)
35*9880d681SAndroid Build Coastguard Worker
36*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
37