[opaque pointer type] Add textual IR support for explicit type parameter to gep operator
[oota-llvm.git] / test / CodeGen / Mips / largeimmprinting.ll
1 ; RUN: llc -march=mipsel < %s | FileCheck %s -check-prefix=32
2 ; RUN: llc -march=mips64el -mcpu=mips4 -target-abi=n64 < %s | \
3 ; RUN:     FileCheck %s -check-prefix=64
4 ; RUN: llc -march=mips64el -mcpu=mips64 -target-abi=n64 < %s | \
5 ; RUN:     FileCheck %s -check-prefix=64
6
7 %struct.S1 = type { [65536 x i8] }
8
9 @s1 = external global %struct.S1
10
11 define void @f() nounwind {
12 entry:
13 ; 32:  lui $[[R0:[0-9]+]], 65535
14 ; 32:  addiu $[[R0]], $[[R0]], -24
15 ; 32:  addu $sp, $sp, $[[R0]]
16 ; 32:  lui $[[R1:[0-9]+]], 1
17 ; 32:  addu $[[R1]], $sp, $[[R1]]
18 ; 32:  sw $ra, 20($[[R1]])
19 ; 64:  daddiu  $[[R0:[0-9]+]], $zero, 1
20 ; 64:  dsll  $[[R0]], $[[R0]], 48
21 ; 64:  daddiu  $[[R0]], $[[R0]], -1
22 ; 64:  dsll  $[[R0]], $[[R0]], 16
23 ; 64:  daddiu  $[[R0]], $[[R0]], -32
24 ; 64:  daddu $sp, $sp, $[[R0]]
25 ; 64:  lui $[[R1:[0-9]+]], 1
26 ; 64:  daddu $[[R1]], $sp, $[[R1]]
27 ; 64:  sd  $ra, 24($[[R1]])
28
29   %agg.tmp = alloca %struct.S1, align 1
30   %tmp = getelementptr inbounds %struct.S1, %struct.S1* %agg.tmp, i32 0, i32 0, i32 0
31   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)
32   call void @f2(%struct.S1* byval %agg.tmp) nounwind
33   ret void
34 }
35
36 declare void @f2(%struct.S1* byval)
37
38 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind