Home | History | Annotate | Download | only in AMDGPU
      1 ; RUN: llc -mtriple=amdgcn--amdhsa -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
      2 
      3 declare i32 @llvm.amdgcn.workitem.id.x() #0
      4 ; GCN-LABEL: {{^}}convergent_inlineasm:
      5 ; GCN: BB#0:
      6 ; GCN: v_cmp_ne_i32_e64
      7 ; GCN: BB#1:
      8 define void @convergent_inlineasm(i64 addrspace(1)* nocapture %arg) {
      9 bb:
     10   %tmp = call i32 @llvm.amdgcn.workitem.id.x()
     11   %tmp1 = tail call i64 asm "v_cmp_ne_i32_e64 $0, 0, $1", "=s,v"(i32 1) #1
     12   %tmp2 = icmp eq i32 %tmp, 8
     13   br i1 %tmp2, label %bb3, label %bb5
     14 
     15 bb3:                                              ; preds = %bb
     16   %tmp4 = getelementptr i64, i64 addrspace(1)* %arg, i32 %tmp
     17   store i64 %tmp1, i64 addrspace(1)* %arg, align 8
     18   br label %bb5
     19 
     20 bb5:                                              ; preds = %bb3, %bb
     21   ret void
     22 }
     23 
     24 ; GCN-LABEL: {{^}}nonconvergent_inlineasm:
     25 ; GCN: BB#1:
     26 ; GCN: v_cmp_ne_i32_e64
     27 ; GCN: BB1_2:
     28 define void @nonconvergent_inlineasm(i64 addrspace(1)* nocapture %arg) {
     29 bb:
     30   %tmp = call i32 @llvm.amdgcn.workitem.id.x()
     31   %tmp1 = tail call i64 asm "v_cmp_ne_i32_e64 $0, 0, $1", "=s,v"(i32 1)
     32   %tmp2 = icmp eq i32 %tmp, 8
     33   br i1 %tmp2, label %bb3, label %bb5
     34 
     35 bb3:                                              ; preds = %bb
     36   %tmp4 = getelementptr i64, i64 addrspace(1)* %arg, i32 %tmp
     37   store i64 %tmp1, i64 addrspace(1)* %arg, align 8
     38   br label %bb5
     39 
     40 bb5:                                              ; preds = %bb3, %bb
     41   ret void
     42 }
     43 
     44 attributes #0 = { nounwind readnone }
     45 attributes #1 = { convergent nounwind readnone }
     46