1*9880d681SAndroid Build Coastguard Worker; RUN: opt %s -mtriple amdgcn-- -analyze -divergence | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; CHECK: DIVERGENT: %tmp = cmpxchg volatile 4*9880d681SAndroid Build Coastguard Workerdefine void @unreachable_loop(i32 %tidx) #0 { 5*9880d681SAndroid Build Coastguard Workerentry: 6*9880d681SAndroid Build Coastguard Worker unreachable 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Workerunreachable_loop: ; preds = %do.body.i, %if.then11 9*9880d681SAndroid Build Coastguard Worker %tmp = cmpxchg volatile i32 addrspace(1)* null, i32 0, i32 0 seq_cst seq_cst 10*9880d681SAndroid Build Coastguard Worker %cmp.i = extractvalue { i32, i1 } %tmp, 1 11*9880d681SAndroid Build Coastguard Worker br i1 %cmp.i, label %unreachable_loop, label %end 12*9880d681SAndroid Build Coastguard Worker 13*9880d681SAndroid Build Coastguard Workerend: ; preds = %do.body.i51, %atomicAdd_g_f.exit 14*9880d681SAndroid Build Coastguard Worker unreachable 15*9880d681SAndroid Build Coastguard Worker} 16*9880d681SAndroid Build Coastguard Worker 17*9880d681SAndroid Build Coastguard Workerattributes #0 = { norecurse nounwind } 18