brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · 88b5029 Raw
58 lines · plain
1; RUN: llc -mtriple=mipsel \2; RUN:     -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC-O323; RUN: llc -mtriple=mipsel-linux-gnu \4; RUN:     -relocation-model=static < %s | FileCheck %s -check-prefix=STATIC-O325; RUN: llc -mtriple=mips64el -mcpu=mips64r2 -target-abi n32 \6; RUN:     -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC-N327; RUN: llc -mtriple=mips64el -mcpu=mips64r2 -target-abi n32 \8; RUN:     -relocation-model=static < %s | FileCheck %s -check-prefix=STATIC-N329; RUN: llc -mtriple=mips64el -mcpu=mips64r2 -target-abi n64 \10; RUN:     -relocation-model=pic < %s | FileCheck %s -check-prefix=PIC-N6411; RUN: llc -mtriple=mips64el -mcpu=mips64r2 -target-abi n64 \12; RUN:     -relocation-model=static < %s | FileCheck %s -check-prefix=STATIC-N6413 14@s1 = internal unnamed_addr global i32 8, align 415@g1 = external global i3216 17define void @foo() nounwind {18entry:19; PIC-O32: lw  $[[R0:[0-9]+]], %got(s1)20; PIC-O32: lw  ${{[0-9]+}}, %lo(s1)($[[R0]])21; PIC-O32: lw  ${{[0-9]+}}, %got(g1)22; STATIC-O32: lui $[[R1:[0-9]+]], %hi(s1)23; STATIC-O32: lw  ${{[0-9]+}}, %lo(s1)($[[R1]])24; STATIC-O32: lui $[[R2:[0-9]+]], %hi(g1)25; STATIC-O32: lw  ${{[0-9]+}}, %lo(g1)($[[R2]])26 27; PIC-N32: lw  $[[R0:[0-9]+]], %got_page(s1)28; PIC-N32: lw  ${{[0-9]+}}, %got_ofst(s1)($[[R0]])29; PIC-N32: lw  ${{[0-9]+}}, %got_disp(g1)30; STATIC-N32: lui $[[R1:[0-9]+]], %hi(s1)31; STATIC-N32: lw  ${{[0-9]+}}, %lo(s1)($[[R1]])32; STATIC-N32: lui $[[R2:[0-9]+]], %hi(g1)33; STATIC-N32: lw  ${{[0-9]+}}, %lo(g1)($[[R2]])34 35; PIC-N64: ld  $[[R0:[0-9]+]], %got_page(s1)36; PIC-N64: lw  ${{[0-9]+}}, %got_ofst(s1)($[[R0]])37; PIC-N64: ld  ${{[0-9]+}}, %got_disp(g1)38; STATIC-N64: lui $[[R1:[0-9]+]], %highest(s1)39; STATIC-N64: daddiu ${{[0-9]+}}, ${{[0-9]+}}, %higher(s1)40; STATIC-N64: daddiu ${{[0-9]+}}, ${{[0-9]+}}, %hi(s1)41; STATIC-N64: dsll $[[R2:[0-9]+]], $[[R1]], 1642; STATIC-N64: lw  ${{[0-9]+}}, %lo(s1)($[[R2]])43; STATIC-N64: lui $[[R3:[0-9]+]], %highest(g1)44; STATIC-N64: daddiu $[[R3]], $[[R3]], %higher(g1)45; STATIC-N64: daddiu $[[R3]], $[[R3]], %hi(g1)46; STATIC-N64: lw  ${{[0-9]+}}, %lo(g1)($[[R3]])47 48  %0 = load i32, ptr @s1, align 449  tail call void @foo1(i32 %0) nounwind50  %1 = load i32, ptr @g1, align 451  store i32 %1, ptr @s1, align 452  %add = add nsw i32 %1, 253  store i32 %add, ptr @g1, align 454  ret void55}56 57declare void @foo1(i32)58