59 lines · plain
1; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=C12; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=C23; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=PE4; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -relocation-model=static -O3 < %s | FileCheck %s -check-prefix=ST15; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -relocation-model=static -O3 < %s | FileCheck %s -check-prefix=ST26;7; RUN: llc -mtriple=mipsel-linux-gnu -mattr=mips16 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=SR8; RUN: llc -mtriple=mipsel-linux-gnu -mcpu=mips32 -relocation-model=pic -O3 < %s | FileCheck %s -check-prefix=SR329 10 11@.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00", align 112 13define i32 @main() nounwind {14entry:15 %call = call i32 (ptr, ...) @printf(ptr @.str)16 ret i32 017 18; SR: .set mips1619 20; SR32: .set nomips1621; SR32: .ent main22; SR-NOT: .set noreorder23; SR-NOT: .set nomacro24; SR-NOT: .set noat25; SR32: .set noreorder26; SR32: .set nomacro27; SR32: .set noat28; SR: save $ra, 24 # 16 bit inst29; PE: .ent main30; PE: li $[[T1:[0-9]+]], %hi(_gp_disp)31; PE-NEXT: addiu $[[T2:[0-9]+]], $pc, %lo(_gp_disp)32; PE: sll $[[T3:[0-9]+]], $[[T1]], 1633; C1: lw ${{[0-9]+}}, %got($.str)(${{[0-9]+}})34; C2: lw ${{[0-9]+}}, %call16(printf)(${{[0-9]+}})35; C1: addiu ${{[0-9]+}}, %lo($.str)36; C2: move $25, ${{[0-9]+}}37; C1: move $gp, ${{[0-9]+}}38; C1: jalrc ${{[0-9]+}}39; SR: restore $ra, 24 # 16 bit inst40; PE: li $2, 041; PE: jrc $ra42 43; ST1: li ${{[0-9]+}}, %hi($.str)44; ST1: sll ${{[0-9]+}}, ${{[0-9]+}}, 1645; ST1: addiu ${{[0-9]+}}, %lo($.str)46; ST2: li ${{[0-9]+}}, %hi($.str)47; ST2: jal printf48}49 50; SR-NOT: .set at51; SR-NOT: .set macro52; SR-NOT: .set reorder53; SR32: .set at54; SR32: .set macro55; SR32: .set reorder56; SR: .end main57; SR32: .end main58declare i32 @printf(ptr, ...)59