92 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -O0 -mtriple=mipsel-unknown-linux-gnu -mcpu=mips32r2 -target-abi=o32 < %s -filetype=asm -o - \3; RUN: | FileCheck -check-prefixes=O32 %s4; RUN: llc -O0 -mtriple=mips64el-unknown-linux-gnu -mcpu=mips64r2 -target-abi=n32 < %s -filetype=asm -o - \5; RUN: | FileCheck -check-prefixes=N32 %s6; RUN: llc -O0 -mtriple=mips64el-unknown-linux-gnu -mcpu=mips64r2 -target-abi=n64 < %s -filetype=asm -o - \7; RUN: | FileCheck -check-prefixes=N64 %s8 9@sym = external global ptr10 11define void @foo(i32 %new, i32 %old) {12; O32-LABEL: foo:13; O32: # %bb.0: # %entry14; O32-NEXT: lui $1, %hi(sym)15; O32-NEXT: lw $3, %lo(sym)($1)16; O32-NEXT: sync17; O32-NEXT: $BB0_1: # %entry18; O32-NEXT: # =>This Inner Loop Header: Depth=119; O32-NEXT: ll $1, 0($3)20; O32-NEXT: bne $1, $4, $BB0_321; O32-NEXT: nop22; O32-NEXT: # %bb.2: # %entry23; O32-NEXT: # in Loop: Header=BB0_1 Depth=124; O32-NEXT: move $2, $525; O32-NEXT: sc $2, 0($3)26; O32-NEXT: beqz $2, $BB0_127; O32-NEXT: nop28; O32-NEXT: $BB0_3: # %entry29; O32-NEXT: sync30; O32-NEXT: jr $ra31; O32-NEXT: nop32;33; N32-LABEL: foo:34; N32: # %bb.0: # %entry35; N32-NEXT: move $1, $536; N32-NEXT: sll $5, $1, 037; N32-NEXT: move $1, $438; N32-NEXT: sll $4, $1, 039; N32-NEXT: lui $1, %hi(sym)40; N32-NEXT: lw $3, %lo(sym)($1)41; N32-NEXT: sync42; N32-NEXT: .LBB0_1: # %entry43; N32-NEXT: # =>This Inner Loop Header: Depth=144; N32-NEXT: ll $1, 0($3)45; N32-NEXT: bne $1, $4, .LBB0_346; N32-NEXT: nop47; N32-NEXT: # %bb.2: # %entry48; N32-NEXT: # in Loop: Header=BB0_1 Depth=149; N32-NEXT: move $2, $550; N32-NEXT: sc $2, 0($3)51; N32-NEXT: beqz $2, .LBB0_152; N32-NEXT: nop53; N32-NEXT: .LBB0_3: # %entry54; N32-NEXT: sync55; N32-NEXT: jr $ra56; N32-NEXT: nop57;58; N64-LABEL: foo:59; N64: # %bb.0: # %entry60; N64-NEXT: move $1, $561; N64-NEXT: sll $5, $1, 062; N64-NEXT: move $1, $463; N64-NEXT: sll $4, $1, 064; N64-NEXT: lui $1, %highest(sym)65; N64-NEXT: daddiu $1, $1, %higher(sym)66; N64-NEXT: dsll $1, $1, 1667; N64-NEXT: daddiu $1, $1, %hi(sym)68; N64-NEXT: dsll $1, $1, 1669; N64-NEXT: ld $3, %lo(sym)($1)70; N64-NEXT: sync71; N64-NEXT: .LBB0_1: # %entry72; N64-NEXT: # =>This Inner Loop Header: Depth=173; N64-NEXT: ll $1, 0($3)74; N64-NEXT: bne $1, $4, .LBB0_375; N64-NEXT: nop76; N64-NEXT: # %bb.2: # %entry77; N64-NEXT: # in Loop: Header=BB0_1 Depth=178; N64-NEXT: move $2, $579; N64-NEXT: sc $2, 0($3)80; N64-NEXT: beqz $2, .LBB0_181; N64-NEXT: nop82; N64-NEXT: .LBB0_3: # %entry83; N64-NEXT: sync84; N64-NEXT: jr $ra85; N64-NEXT: nop86entry:87 %0 = load ptr, ptr @sym88 cmpxchg ptr %0, i32 %new, i32 %old seq_cst seq_cst89 ret void90}91 92