Skip to content

Conversation

harkal
Copy link
Collaborator

@harkal harkal commented Sep 11, 2025

What I did

In SCCP._eval, if any input operand’s lattice value is TOP, the instruction now defers evaluation and finalizes to TOP instead of asserting. Also reschedule instructions after setting to BOTTOM in the generic case.

Added a test for it.

How I did it

How to verify it

Commit message

This commit updates SCCP to not assert during arithmetic evaluation 
if any operand’s lattice value was not a literal, and instead 
`SCCP._eval` returns TOP when any operand is TOP (defers 
constant folding) and keep existing semantics for BOTTOM and 
literals. Adds a test that triggers the assertion without the fix. 
Reschedule instructions in generic case when setting to BOTTOM.

Description for the changelog

Cute Animal Picture

image

@harkal harkal marked this pull request as ready for review September 11, 2025 10:56
@harkal harkal requested review from HodanPlodky and charles-cooper and removed request for HodanPlodky September 11, 2025 10:56
Copy link

codecov bot commented Sep 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.21%. Comparing base (2e57901) to head (0bf5776).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4748      +/-   ##
==========================================
- Coverage   93.22%   93.21%   -0.01%     
==========================================
  Files         136      136              
  Lines       19190    19186       -4     
  Branches     3293     3292       -1     
==========================================
- Hits        17889    17885       -4     
  Misses        884      884              
  Partials      417      417              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@harkal harkal changed the title fix[venom]: fixes SCCP to handle unknown TOP operands safely fix[venom]: fixes to SCCP Sep 12, 2025
@charles-cooper charles-cooper changed the title fix[venom]: fixes to SCCP fix[venom]: fix sccp TOP evaluation order Sep 18, 2025
@charles-cooper charles-cooper changed the title fix[venom]: fix sccp TOP evaluation order fix[venom]: fix sccp TOP evaluation order Sep 18, 2025
@charles-cooper charles-cooper merged commit 0b93624 into vyperlang:master Sep 18, 2025
164 checks passed
@harkal harkal deleted the fix/venom/sccp_defer_eval_top branch September 18, 2025 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants