2525 end
2626
2727 ir = sprint (io-> ptx_code_llvm (io, kernel, Tuple{Aggregate}))
28- @test occursin (r" @.*julia_kernel.+ \( ({ i64 }|\[ 1 x i64\] )\* " , ir)
28+ @test occursin (r" @\w *kernel \w * \( ({ i64 }|\[ 1 x i64\] )\* " , ir)
2929
3030 ir = sprint (io-> ptx_code_llvm (io, kernel, Tuple{Aggregate}; kernel= true ))
31- @test occursin (r" @.*julia_kernel.+ \( .*({ i64 }|\[ 1 x i64\] ) " , ir)
31+ @test occursin (r" @\w *kernel \w * \( .*({ i64 }|\[ 1 x i64\] ) " , ir)
3232end
3333
3434@testset " property_annotations" begin
8383 kernel () = return
8484
8585 ir = sprint (io-> ptx_code_llvm (io, kernel, Tuple{}))
86- @test any ( occursin (r" @. *kernel.+ \ (\)" , a) for a in split (ir, " \n " ) )
86+ @test occursin (r" @\w *kernel\w * \ (\)" , ir )
8787
8888 ir = sprint (io-> ptx_code_llvm (io, kernel, Tuple{}; kernel= true ))
89- @test any ( occursin (r" @. *kernel.+ \ (\[ 1 x i64\] %state\) " , a) for a in split (ir, " \n " ) )
89+ @test occursin (r" @\w *kernel\w * \ (\[ 1 x i64\] %state\) " , ir )
9090
9191 # state should only passed to device functions that use it
9292
@@ -106,16 +106,16 @@ end
106106 kernel= true , dump_module= true ))
107107
108108 # kernel should take state argument before all else
109- @test any ( occursin (r" @. *kernel.+ \ (\[ 1 x i64\] %state" , a) for a in split (ir, " \n " ) )
109+ @test occursin (r" @\w *kernel\w * \ (\[ 1 x i64\] %state" , ir )
110110
111111 # child1 doesn't use the state
112- @test any ( occursin (r" @. *child1.+ \ ( i64" , a) for a in split (ir, " \n " ) )
112+ @test occursin (r" @\w *child1\w * \ ( i64" , ir )
113113
114114 # child2 does
115- @test any ( occursin (r" @. *child2.+ \ (\[ 1 x i64\] %state" , a) for a in split (ir, " \n " ) )
115+ @test occursin (r" @\w *child2\w * \ (\[ 1 x i64\] %state" , ir )
116116
117117 # can't have the unlowered intrinsic
118- @test ! any ( occursin (" julia.gpu.state_getter" , a) for a in split (ir, " \n " ) )
118+ @test ! occursin (" julia.gpu.state_getter" , ir )
119119end
120120end
121121
146146 end
147147
148148 asm = sprint (io-> ptx_code_native (io, entry, Tuple{Int64}; kernel= true ))
149- @test occursin (r" \. visible \. entry .*julia_entry " , asm)
150- @test ! occursin (r" \. visible \. func .*julia_nonentry " , asm)
151- @test occursin (r" \. func .*julia_nonentry " , asm)
149+ @test occursin (r" \. visible \. entry \w *entry " , asm)
150+ @test ! occursin (r" \. visible \. func \w *nonentry " , asm)
151+ @test occursin (r" \. func \w *nonentry " , asm)
152152
153153@testset " property_annotations" begin
154154 asm = sprint (io-> ptx_code_native (io, entry, Tuple{Int64}; kernel= true ))
@@ -185,15 +185,15 @@ end
185185 end
186186
187187 asm = sprint (io-> ptx_code_native (io, parent1, Tuple{Int}))
188- @test occursin (r" .func julia_. *child_" , asm)
188+ @test occursin (r" .func \w *child_" , asm)
189189
190190 function parent2 (i)
191191 child (i+ 1 )
192192 return
193193 end
194194
195195 asm = sprint (io-> ptx_code_native (io, parent2, Tuple{Int}))
196- @test occursin (r" .func julia_. *child_" , asm)
196+ @test occursin (r" .func \w *child_" , asm)
197197end
198198
199199@testset " child function reuse bis" begin
0 commit comments