File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,25 +95,19 @@ def test_DILocation(self):
9595 """ Tests that DILocation information is reasonable.
9696 """
9797 @njit (debug = True , error_model = 'numpy' )
98- def foo (a , z ):
99- b = a + 1
98+ def foo (a ):
99+ b = a + 1.23
100100 c = a * 2.34
101- e = b / c
102- if a > z :
103- d = (a , b , c , z )
104- else :
105- d = (z , b , c , a )
101+ d = b / c
106102 print (d )
107- return b , c , d , e
103+ return d
108104
109105 # the above produces LLVM like:
110106 # define function() {
111107 # entry:
112108 # alloca
113109 # store 0 to alloca
114- # <arithmetic for doing the operations on b, c, e>
115- # fcmp for a > z
116- # select version of d
110+ # <arithmetic for doing the operations on b, c, d>
117111 # setup for print
118112 # branch
119113 # other_labels:
@@ -126,7 +120,7 @@ def foo(a, z):
126120 # * that the !dbg entries are monotonically increasing in value with
127121 # source line number
128122
129- sig = (types .float64 , types . float64 )
123+ sig = (types .float64 ,)
130124 metadata = self ._get_metadata (foo , sig = sig )
131125 full_ir = self ._get_llvmir (foo , sig = sig )
132126
@@ -189,9 +183,8 @@ def foo(a, z):
189183 # and the function definition line.
190184 offsets = [0 , # b = a + 1
191185 1 , # a * 2.34
192- 2 , # e = b / c
193- 3 , # select on a > z
194- 7 , # print(d), there's a jump because this is the phi of d
186+ 2 , # d = b / c
187+ 3 , # print(d)
195188 ]
196189 pyln_range = [pysrc_line_start + 2 + x for x in offsets ]
197190
You can’t perform that action at this time.
0 commit comments