47 lines · plain
1; RUN: llc -verify-machineinstrs -mcpu=pwr7 < %s | FileCheck %s2target datalayout = "E-m:e-i64:64-n32:64"3target triple = "powerpc64-unknown-linux-gnu"4 5%struct.inode.0.12.120 = type { ptr }6%struct.kstat2.1.13.121 = type { i32 }7%struct.task_struct.4.16.124 = type { ptr, %struct.atomic_t.2.14.122, ptr }8%struct.atomic_t.2.14.122 = type { i32 }9%struct.signal_struct.3.15.123 = type { i64 }10%struct.pid.5.17.125 = type { ptr }11 12; Function Attrs: nounwind13define signext i32 @proc_task_getattr(ptr nocapture readonly %inode, ptr nocapture %stat) #0 {14entry:15 %call1.i = tail call ptr @get_pid_task(ptr undef, i32 zeroext 0) #016 br i1 undef, label %if.end, label %if.then17 18if.then: ; preds = %entry19 %0 = load i64, ptr undef, align 820 %conv.i = trunc i64 %0 to i3221 %1 = load i32, ptr null, align 422 %add = add i32 %1, %conv.i23 store i32 %add, ptr null, align 424 %counter.i.i = getelementptr inbounds %struct.task_struct.4.16.124, ptr %call1.i, i64 0, i32 1, i32 025 %2 = tail call i32 asm sideeffect "\09lwsync\0A1:\09lwarx\09$0,0,$1\09\09# atomic_dec_return\0A\09addic\09$0,$0,-1\0A\09stwcx.\09$0,0,$1\0A\09bne-\091b\0A\09sync\0A", "=&r,r,~{cr0},~{xer},~{memory}"(ptr %counter.i.i) #026 %cmp.i = icmp eq i32 %2, 027 br i1 %cmp.i, label %if.then.i, label %if.end28 29; CHECK-LABEL: @proc_task_getattr30; CHECK-NOT: stwcx. [[REG:[0-9]+]],0,[[REG]]31; CHECK: blr32 33if.then.i: ; preds = %if.then34 tail call void @foo(ptr %call1.i) #035 unreachable36 37if.end: ; preds = %if.then, %entry38 ret i32 039}40 41declare void @foo(ptr)42 43declare ptr @get_pid_task(ptr, i32 zeroext)44 45attributes #0 = { nounwind }46 47