From bec3012ecf0785109a73df86a2eb2e73684a7235 Mon Sep 17 00:00:00 2001 From: cmgCr Date: Wed, 8 Apr 2026 13:54:27 +0000 Subject: [PATCH] fix(compiler): fix live range calc assertion when no reaching def found In findReachingDefs(), UniqueVNI was not reset to false when TheVNI was nullptr and Undefs was empty, causing an assertion failure during multipass JIT compilation of certain EVM bytecode patterns. Remove the unnecessary !Undefs.empty() guard so that FoundUndef alone controls the UniqueVNI flag. --- src/compiler/cgir/pass/live_range_calc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/cgir/pass/live_range_calc.cpp b/src/compiler/cgir/pass/live_range_calc.cpp index 8eae291f3..95b10c61c 100644 --- a/src/compiler/cgir/pass/live_range_calc.cpp +++ b/src/compiler/cgir/pass/live_range_calc.cpp @@ -270,7 +270,7 @@ bool CgLiveRangeCalc::findReachingDefs(CgLiveRange &LR, CgBasicBlock &UseMBB, LiveIn.clear(); FoundUndef |= (TheVNI == nullptr || TheVNI == &UndefVNI); - if (!Undefs.empty() && FoundUndef) + if (FoundUndef) UniqueVNI = false; // Both updateSSA() and CgLiveRangeUpdater benefit from ordered blocks, but