Skip to content

Commit cc8dced

Browse files
constprop multi value (#393)
supercede: #392 Co-authored-by: johnzl-777 <[email protected]>
1 parent fc9b82c commit cc8dced

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/kirin/analysis/const/prop.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,12 @@ def eval_stmt(
9696
return self.try_eval_const_pure(frame, stmt, values)
9797

9898
if stmt.has_trait(ir.Pure):
99-
return (Unknown(),) # no implementation but pure
99+
return tuple(
100+
Unknown() for _ in stmt._results
101+
) # no implementation but pure
100102
# not pure, and no implementation, let's say it's not pure
101103
frame.frame_is_not_pure = True
102-
return (Unknown(),)
104+
return tuple(Unknown() for _ in stmt._results)
103105

104106
ret = method(self, frame, stmt)
105107
if stmt.has_trait(ir.IsTerminator) or stmt.has_trait(ir.Pure):

0 commit comments

Comments
 (0)