brintos

brintos / llvm-project-archived public Read only

0
0
Text · 7.8 KiB · 5c78519 Raw
199 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc  < %s -mtriple=mipsel-elf -mcpu=mips32   -relocation-model=pic | FileCheck %s -check-prefixes=MIPS32-EL3; RUN: llc  < %s -mtriple=mips-elf   -mcpu=mips32   -relocation-model=pic | FileCheck %s -check-prefixes=MIPS32-EB4; RUN: llc  < %s -mtriple=mipsel-elf -mcpu=mips32r2 -relocation-model=pic | FileCheck %s -check-prefixes=MIPS32-EL5; RUN: llc  < %s -mtriple=mips-elf   -mcpu=mips32r2 -relocation-model=pic | FileCheck %s -check-prefixes=MIPS32-EB6; RUN: llc  < %s -mtriple=mipsel-elf -mcpu=mips32r6 -relocation-model=pic | FileCheck %s -check-prefixes=MIPS32R6-EL7; RUN: llc  < %s -mtriple=mips-elf   -mcpu=mips32r6 -relocation-model=pic | FileCheck %s -check-prefixes=MIPS32R6-EB8 9%struct.S2 = type { %struct.S1, %struct.S1 }10%struct.S1 = type { i8, i8 }11%struct.S4 = type { [7 x i8] }12 13@s2 = common global %struct.S2 zeroinitializer, align 114@s4 = common global %struct.S4 zeroinitializer, align 115 16define void @bar1() nounwind {17; MIPS32-EL-LABEL: bar1:18; MIPS32-EL:       # %bb.0: # %entry19; MIPS32-EL-NEXT:    lui $2, %hi(_gp_disp)20; MIPS32-EL-NEXT:    addiu $2, $2, %lo(_gp_disp)21; MIPS32-EL-NEXT:    addiu $sp, $sp, -2422; MIPS32-EL-NEXT:    sw $ra, 20($sp) # 4-byte Folded Spill23; MIPS32-EL-NEXT:    addu $gp, $2, $2524; MIPS32-EL-NEXT:    lw $1, %got(s2)($gp)25; MIPS32-EL-NEXT:    lbu $2, 2($1)26; MIPS32-EL-NEXT:    lbu $1, 3($1)27; MIPS32-EL-NEXT:    sll $1, $1, 828; MIPS32-EL-NEXT:    lw $25, %call16(foo2)($gp)29; MIPS32-EL-NEXT:    .reloc $tmp0, R_MIPS_JALR, foo230; MIPS32-EL-NEXT:  $tmp0:31; MIPS32-EL-NEXT:    jalr $2532; MIPS32-EL-NEXT:    or $4, $1, $233; MIPS32-EL-NEXT:    lw $ra, 20($sp) # 4-byte Folded Reload34; MIPS32-EL-NEXT:    jr $ra35; MIPS32-EL-NEXT:    addiu $sp, $sp, 2436;37; MIPS32-EB-LABEL: bar1:38; MIPS32-EB:       # %bb.0: # %entry39; MIPS32-EB-NEXT:    lui $2, %hi(_gp_disp)40; MIPS32-EB-NEXT:    addiu $2, $2, %lo(_gp_disp)41; MIPS32-EB-NEXT:    addiu $sp, $sp, -2442; MIPS32-EB-NEXT:    sw $ra, 20($sp) # 4-byte Folded Spill43; MIPS32-EB-NEXT:    addu $gp, $2, $2544; MIPS32-EB-NEXT:    lw $1, %got(s2)($gp)45; MIPS32-EB-NEXT:    lbu $2, 3($1)46; MIPS32-EB-NEXT:    sll $2, $2, 1647; MIPS32-EB-NEXT:    lbu $1, 2($1)48; MIPS32-EB-NEXT:    sll $1, $1, 2449; MIPS32-EB-NEXT:    lw $25, %call16(foo2)($gp)50; MIPS32-EB-NEXT:    .reloc $tmp0, R_MIPS_JALR, foo251; MIPS32-EB-NEXT:  $tmp0:52; MIPS32-EB-NEXT:    jalr $2553; MIPS32-EB-NEXT:    or $4, $1, $254; MIPS32-EB-NEXT:    lw $ra, 20($sp) # 4-byte Folded Reload55; MIPS32-EB-NEXT:    jr $ra56; MIPS32-EB-NEXT:    addiu $sp, $sp, 2457;58; MIPS32R6-EL-LABEL: bar1:59; MIPS32R6-EL:       # %bb.0: # %entry60; MIPS32R6-EL-NEXT:    lui $2, %hi(_gp_disp)61; MIPS32R6-EL-NEXT:    addiu $2, $2, %lo(_gp_disp)62; MIPS32R6-EL-NEXT:    addiu $sp, $sp, -2463; MIPS32R6-EL-NEXT:    sw $ra, 20($sp) # 4-byte Folded Spill64; MIPS32R6-EL-NEXT:    addu $gp, $2, $2565; MIPS32R6-EL-NEXT:    lw $1, %got(s2)($gp)66; MIPS32R6-EL-NEXT:    lhu $4, 2($1)67; MIPS32R6-EL-NEXT:    lw $25, %call16(foo2)($gp)68; MIPS32R6-EL-NEXT:    .reloc $tmp0, R_MIPS_JALR, foo269; MIPS32R6-EL-NEXT:  $tmp0:70; MIPS32R6-EL-NEXT:    jalrc $2571; MIPS32R6-EL-NEXT:    lw $ra, 20($sp) # 4-byte Folded Reload72; MIPS32R6-EL-NEXT:    jr $ra73; MIPS32R6-EL-NEXT:    addiu $sp, $sp, 2474;75; MIPS32R6-EB-LABEL: bar1:76; MIPS32R6-EB:       # %bb.0: # %entry77; MIPS32R6-EB-NEXT:    lui $2, %hi(_gp_disp)78; MIPS32R6-EB-NEXT:    addiu $2, $2, %lo(_gp_disp)79; MIPS32R6-EB-NEXT:    addiu $sp, $sp, -2480; MIPS32R6-EB-NEXT:    sw $ra, 20($sp) # 4-byte Folded Spill81; MIPS32R6-EB-NEXT:    addu $gp, $2, $2582; MIPS32R6-EB-NEXT:    lw $1, %got(s2)($gp)83; MIPS32R6-EB-NEXT:    lhu $1, 2($1)84; MIPS32R6-EB-NEXT:    lw $25, %call16(foo2)($gp)85; MIPS32R6-EB-NEXT:    .reloc $tmp0, R_MIPS_JALR, foo286; MIPS32R6-EB-NEXT:  $tmp0:87; MIPS32R6-EB-NEXT:    jalr $2588; MIPS32R6-EB-NEXT:    sll $4, $1, 1689; MIPS32R6-EB-NEXT:    lw $ra, 20($sp) # 4-byte Folded Reload90; MIPS32R6-EB-NEXT:    jr $ra91; MIPS32R6-EB-NEXT:    addiu $sp, $sp, 2492entry:93  tail call void @foo2(ptr byval(%struct.S1) getelementptr inbounds (%struct.S2, ptr @s2, i32 0, i32 1)) nounwind94  ret void95}96 97; FIXME: We should be able to do better than this using lhu98define void @bar2() nounwind {99; MIPS32-EL-LABEL: bar2:100; MIPS32-EL:       # %bb.0: # %entry101; MIPS32-EL-NEXT:    lui $2, %hi(_gp_disp)102; MIPS32-EL-NEXT:    addiu $2, $2, %lo(_gp_disp)103; MIPS32-EL-NEXT:    addiu $sp, $sp, -24104; MIPS32-EL-NEXT:    sw $ra, 20($sp) # 4-byte Folded Spill105; MIPS32-EL-NEXT:    addu $gp, $2, $25106; MIPS32-EL-NEXT:    lw $1, %got(s4)($gp)107; MIPS32-EL-NEXT:    lwl $4, 3($1)108; MIPS32-EL-NEXT:    lwr $4, 0($1)109; MIPS32-EL-NEXT:    lbu $2, 4($1)110; MIPS32-EL-NEXT:    lbu $3, 5($1)111; MIPS32-EL-NEXT:    sll $3, $3, 8112; MIPS32-EL-NEXT:    or $2, $3, $2113; MIPS32-EL-NEXT:    lbu $1, 6($1)114; MIPS32-EL-NEXT:    sll $1, $1, 16115; MIPS32-EL-NEXT:    lw $25, %call16(foo4)($gp)116; MIPS32-EL-NEXT:    .reloc $tmp1, R_MIPS_JALR, foo4117; MIPS32-EL-NEXT:  $tmp1:118; MIPS32-EL-NEXT:    jalr $25119; MIPS32-EL-NEXT:    or $5, $2, $1120; MIPS32-EL-NEXT:    lw $ra, 20($sp) # 4-byte Folded Reload121; MIPS32-EL-NEXT:    jr $ra122; MIPS32-EL-NEXT:    addiu $sp, $sp, 24123;124; MIPS32-EB-LABEL: bar2:125; MIPS32-EB:       # %bb.0: # %entry126; MIPS32-EB-NEXT:    lui $2, %hi(_gp_disp)127; MIPS32-EB-NEXT:    addiu $2, $2, %lo(_gp_disp)128; MIPS32-EB-NEXT:    addiu $sp, $sp, -24129; MIPS32-EB-NEXT:    sw $ra, 20($sp) # 4-byte Folded Spill130; MIPS32-EB-NEXT:    addu $gp, $2, $25131; MIPS32-EB-NEXT:    lw $1, %got(s4)($gp)132; MIPS32-EB-NEXT:    lwl $4, 0($1)133; MIPS32-EB-NEXT:    lbu $2, 5($1)134; MIPS32-EB-NEXT:    lwr $4, 3($1)135; MIPS32-EB-NEXT:    sll $2, $2, 16136; MIPS32-EB-NEXT:    lbu $3, 4($1)137; MIPS32-EB-NEXT:    sll $3, $3, 24138; MIPS32-EB-NEXT:    or $2, $3, $2139; MIPS32-EB-NEXT:    lbu $1, 6($1)140; MIPS32-EB-NEXT:    sll $1, $1, 8141; MIPS32-EB-NEXT:    lw $25, %call16(foo4)($gp)142; MIPS32-EB-NEXT:    .reloc $tmp1, R_MIPS_JALR, foo4143; MIPS32-EB-NEXT:  $tmp1:144; MIPS32-EB-NEXT:    jalr $25145; MIPS32-EB-NEXT:    or $5, $2, $1146; MIPS32-EB-NEXT:    lw $ra, 20($sp) # 4-byte Folded Reload147; MIPS32-EB-NEXT:    jr $ra148; MIPS32-EB-NEXT:    addiu $sp, $sp, 24149;150; MIPS32R6-EL-LABEL: bar2:151; MIPS32R6-EL:       # %bb.0: # %entry152; MIPS32R6-EL-NEXT:    lui $2, %hi(_gp_disp)153; MIPS32R6-EL-NEXT:    addiu $2, $2, %lo(_gp_disp)154; MIPS32R6-EL-NEXT:    addiu $sp, $sp, -24155; MIPS32R6-EL-NEXT:    sw $ra, 20($sp) # 4-byte Folded Spill156; MIPS32R6-EL-NEXT:    addu $gp, $2, $25157; MIPS32R6-EL-NEXT:    lw $1, %got(s4)($gp)158; MIPS32R6-EL-NEXT:    lhu $2, 4($1)159; MIPS32R6-EL-NEXT:    lbu $3, 6($1)160; MIPS32R6-EL-NEXT:    sll $3, $3, 16161; MIPS32R6-EL-NEXT:    lw $4, 0($1)162; MIPS32R6-EL-NEXT:    lw $25, %call16(foo4)($gp)163; MIPS32R6-EL-NEXT:    .reloc $tmp1, R_MIPS_JALR, foo4164; MIPS32R6-EL-NEXT:  $tmp1:165; MIPS32R6-EL-NEXT:    jalr $25166; MIPS32R6-EL-NEXT:    or $5, $2, $3167; MIPS32R6-EL-NEXT:    lw $ra, 20($sp) # 4-byte Folded Reload168; MIPS32R6-EL-NEXT:    jr $ra169; MIPS32R6-EL-NEXT:    addiu $sp, $sp, 24170;171; MIPS32R6-EB-LABEL: bar2:172; MIPS32R6-EB:       # %bb.0: # %entry173; MIPS32R6-EB-NEXT:    lui $2, %hi(_gp_disp)174; MIPS32R6-EB-NEXT:    addiu $2, $2, %lo(_gp_disp)175; MIPS32R6-EB-NEXT:    addiu $sp, $sp, -24176; MIPS32R6-EB-NEXT:    sw $ra, 20($sp) # 4-byte Folded Spill177; MIPS32R6-EB-NEXT:    addu $gp, $2, $25178; MIPS32R6-EB-NEXT:    lw $1, %got(s4)($gp)179; MIPS32R6-EB-NEXT:    lbu $2, 6($1)180; MIPS32R6-EB-NEXT:    sll $2, $2, 8181; MIPS32R6-EB-NEXT:    lhu $3, 4($1)182; MIPS32R6-EB-NEXT:    sll $3, $3, 16183; MIPS32R6-EB-NEXT:    lw $4, 0($1)184; MIPS32R6-EB-NEXT:    lw $25, %call16(foo4)($gp)185; MIPS32R6-EB-NEXT:    .reloc $tmp1, R_MIPS_JALR, foo4186; MIPS32R6-EB-NEXT:  $tmp1:187; MIPS32R6-EB-NEXT:    jalr $25188; MIPS32R6-EB-NEXT:    or $5, $3, $2189; MIPS32R6-EB-NEXT:    lw $ra, 20($sp) # 4-byte Folded Reload190; MIPS32R6-EB-NEXT:    jr $ra191; MIPS32R6-EB-NEXT:    addiu $sp, $sp, 24192entry:193  tail call void @foo4(ptr byval(%struct.S4) @s4) nounwind194  ret void195}196 197declare void @foo2(ptr byval(%struct.S1))198declare void @foo4(ptr byval(%struct.S4))199