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: another-str
12 ; CHECK-NOT: .function.
15 ; CHECK-DAG: _$_str_$_
17 ; CHECK-DAG: another_$_str
19 ; CHECK-DAG: _$_function_$_
20 ; CHECK-DAG: _$_function_$_2
22 target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
23 target triple = "nvptx64-unknown-unknown"
26 @.str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
27 @"<str>" = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
28 @_$_str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
29 @another-str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
32 ; Function Attrs: nounwind
33 define internal void @.function.() {
35 %call = call i32 (ptr, ...) @printf(ptr @.str)
36 %call2 = call i32 (ptr, ...) @printf(ptr @"<str>")
40 ; Function Attrs: nounwind
41 define internal void @_$_function_$_() {
43 %call = call i32 (ptr, ...) @printf(ptr @_$_str)
44 %call2 = call i32 (ptr, ...) @printf(ptr @another-str)
48 ; Function Attrs: nounwind
49 define void @global_function() {
51 call void @.function.()
52 call void @_$_function_$_()
56 declare i32 @printf(ptr, ...)