File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
numba_cuda/numba/cuda/tests/cudapy Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,25 @@ def test_issue_5835(self):
7272 def f (x ):
7373 x [0 ] = 0
7474
75+ def test_bool_type (self ):
76+ sig = (types .int32 , types .int32 )
77+ @cuda .jit ("void(int32, int32)" , debug = True , opt = False )
78+ def f (x , y ):
79+ z = x == y
80+
81+ llvm_ir = f .inspect_llvm (sig )
82+
83+ # extract the metadata node id from `type` field of DILocalVariable
84+ pat = r'!DILocalVariable\(.*name:\s+"z".*type:\s+!(\d+)'
85+ match = re .compile (pat ).search (llvm_ir )
86+ self .assertIsNotNone (match , msg = llvm_ir )
87+ mdnode_id = match .group (1 )
88+
89+ # verify the DIBasicType has correct encoding attribute DW_ATE_boolean
90+ pat = f'!{ mdnode_id } \s+=\s+!DIBasicType\(.*DW_ATE_boolean'
91+ match = re .compile (pat ).search (llvm_ir )
92+ self .assertIsNotNone (match , msg = llvm_ir )
93+
7594 @unittest .skip ("Wrappers no longer exist" )
7695 def test_wrapper_has_debuginfo (self ):
7796 sig = (types .int32 [::1 ],)
You can’t perform that action at this time.
0 commit comments