Skip to content

Commit 022f174

Browse files
committed
.
1 parent 5e73e43 commit 022f174

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ir.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,7 @@ def run(self) -> dict[Instr, ConstantLattice]:
853853

854854
while block_worklist or instr_worklist:
855855
if instr_worklist and (instr := instr_worklist.pop(0)):
856+
instr = instr.find()
856857
if isinstance(instr, HasOperands):
857858
for operand in instr.operands:
858859
if operand not in self.instr_uses:
@@ -872,8 +873,10 @@ def run(self) -> dict[Instr, ConstantLattice]:
872873
elif isinstance(instr, CondBranch):
873874
match self.type_of(instr.operands[0]):
874875
case CCBool(True):
876+
instr.make_equal_to(Jump(instr.conseq))
875877
block_worklist.append(instr.conseq)
876878
case CCBool(False):
879+
instr.make_equal_to(Jump(instr.alt))
877880
block_worklist.append(instr.alt)
878881
case CBottom():
879882
pass

0 commit comments

Comments
 (0)