1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple nvptx64-nvidia-cuda -stop-after machine-cp -o - < %s 2>&1 | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; Check that convergent calls are emitted using convergent MIR instructions, 4*9880d681SAndroid Build Coastguard Worker; while non-convergent calls are not. 5*9880d681SAndroid Build Coastguard Worker 6*9880d681SAndroid Build Coastguard Workertarget triple = "nvptx64-nvidia-cuda" 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Workerdeclare void @conv() convergent 9*9880d681SAndroid Build Coastguard Workerdeclare void @not_conv() 10*9880d681SAndroid Build Coastguard Worker 11*9880d681SAndroid Build Coastguard Workerdefine void @test(void ()* %f) { 12*9880d681SAndroid Build Coastguard Worker ; CHECK: ConvergentCallUniPrintCall 13*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: @conv 14*9880d681SAndroid Build Coastguard Worker call void @conv() 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Worker ; CHECK: CallUniPrintCall 17*9880d681SAndroid Build Coastguard Worker ; CHECK-NEXT: @not_conv 18*9880d681SAndroid Build Coastguard Worker call void @not_conv() 19*9880d681SAndroid Build Coastguard Worker 20*9880d681SAndroid Build Coastguard Worker ; CHECK: ConvergentCallPrintCall 21*9880d681SAndroid Build Coastguard Worker call void %f() convergent 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Worker ; CHECK: CallPrintCall 24*9880d681SAndroid Build Coastguard Worker call void %f() 25*9880d681SAndroid Build Coastguard Worker 26*9880d681SAndroid Build Coastguard Worker ret void 27*9880d681SAndroid Build Coastguard Worker} 28