Home | History | Annotate | Download | only in NVPTX
      1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
      2 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
      3 
      4 ; Verify that the NVPTX target removes invalid symbol names prior to emitting
      5 ; PTX.
      6 
      7 ; CHECK-NOT: .str
      8 ; CHECK-NOT: .function.
      9 
     10 ; CHECK-DAG: _$_str
     11 ; CHECK-DAG: _$_str1
     12 
     13 ; CHECK-DAG: _$_function_$_
     14 ; CHECK-DAG: _$_function_$_2
     15 
     16 target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
     17 target triple = "nvptx64-unknown-unknown"
     18 
     19 
     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
     22 
     23 
     24 ; Function Attrs: nounwind
     25 define internal void @.function.() {
     26 entry:
     27   %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0))
     28   ret void
     29 }
     30 
     31 ; Function Attrs: nounwind
     32 define internal void @_$_function_$_() {
     33 entry:
     34   %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @_$_str, i32 0, i32 0))
     35   ret void
     36 }
     37 
     38 ; Function Attrs: nounwind
     39 define void @global_function() {
     40 entry:
     41   call void @.function.()
     42   call void @_$_function_$_()
     43   ret void
     44 }
     45 
     46 declare i32 @printf(i8*, ...)
     47