1 ; RUN: llc < %s -march=ptx64 -mattr=+ptx20,+sm20 | FileCheck %s 2 3 declare i32 @printf(i8*, ...) 4 5 @str = private unnamed_addr constant [6 x i8] c"test\0A\00" 6 7 define ptx_device void @t1_printf() { 8 ; CHECK: mov.u64 %rd{{[0-9]+}}, $L__str; 9 ; CHECK: call.uni (__localparam_{{[0-9]+}}), vprintf, (__localparam_{{[0-9]+}}, __localparam_{{[0-9]+}}); 10 ; CHECK: ret; 11 %1 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([6 x i8]* @str, i64 0, i64 0)) 12 ret void 13 } 14 15 @str2 = private unnamed_addr constant [11 x i8] c"test = %f\0A\00" 16 17 define ptx_device void @t2_printf() { 18 ; CHECK: .local .align 8 .b8 __local{{[0-9]+}}[{{[0-9]+}}]; 19 ; CHECK: mov.u64 %rd{{[0-9]+}}, $L__str2; 20 ; CHECK: cvta.local.u64 %rd{{[0-9]+}}, __local{{[0-9+]}}; 21 ; CHECK: call.uni (__localparam_{{[0-9]+}}), vprintf, (__localparam_{{[0-9]+}}, __localparam_{{[0-9]+}}); 22 ; CHECK: ret; 23 %1 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([11 x i8]* @str2, i64 0, i64 0), double 0x3FF3333340000000) 24 ret void 25 } 26