1 ; RUN: llc < %s -march=nvptx -mattr=+ptx60 -mcpu=sm_30 | FileCheck %s
2 ; RUN: llc < %s -march=nvptx64 -mattr=+ptx60 -mcpu=sm_30 | FileCheck %s
3 ; RUN: %if ptxas && !ptxas-12.0 %{ llc < %s -march=nvptx -mattr=+ptx60 -mcpu=sm_30 | %ptxas-verify %}
4 ; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mattr=+ptx60 -mcpu=sm_30 | %ptxas-verify %}
6 ; Verify that the NVPTX target removes invalid symbol names prior to emitting
11 ; CHECK-NOT: .function.
14 ; CHECK-DAG: _$_str_$_
17 ; CHECK-DAG: _$_function_$_
18 ; CHECK-DAG: _$_function_$_2
20 target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
21 target triple = "nvptx64-unknown-unknown"
24 @.str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
25 @"<str>" = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
26 @_$_str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
29 ; Function Attrs: nounwind
30 define internal void @.function.() {
32 %call = call i32 (ptr, ...) @printf(ptr @.str)
33 %call2 = call i32 (ptr, ...) @printf(ptr @"<str>")
37 ; Function Attrs: nounwind
38 define internal void @_$_function_$_() {
40 %call = call i32 (ptr, ...) @printf(ptr @_$_str)
41 %call2 = call i32 (ptr, ...) @printf(ptr @"<str>")
45 ; Function Attrs: nounwind
46 define void @global_function() {
48 call void @.function.()
49 call void @_$_function_$_()
53 declare i32 @printf(ptr, ...)