1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
2 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
4 ; Verify that the NVPTX target removes invalid symbol names prior to emitting
8 ; CHECK-NOT: .function.
13 ; CHECK-DAG: _$_function_$_
14 ; CHECK-DAG: _$_function_$_2
16 target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
17 target triple = "nvptx64-unknown-unknown"
20 @.str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
21 @_$_str = private unnamed_addr constant [13 x i8] c"%d %f %c %d\0A\00", align 1
24 ; Function Attrs: nounwind
25 define internal void @.function.() {
27 %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0))
31 ; Function Attrs: nounwind
32 define internal void @_$_function_$_() {
34 %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @_$_str, i32 0, i32 0))
38 ; Function Attrs: nounwind
39 define void @global_function() {
41 call void @.function.()
42 call void @_$_function_$_()
46 declare i32 @printf(i8*, ...)