Skip to content

Conversation

@harkal
Copy link
Collaborator

@harkal harkal commented Jan 7, 2026

What I did

How I did it

How to verify it

Commit message

- Remove dead code: `if memloc is None` branch (get_memloc never returns None)
- Add `_normalize_operand()` to traverse assign chains for consistent lattice
  keys when memory location is not statically fixed
- Convert assertions to early returns in `_handle_load` phi insertion when
  predecessors are skipped (missing ptr, empty values, or count mismatch)
- Add tests for nested diamond CFG patterns verifying correct bailout behavior

Description for the changelog

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@harkal harkal marked this pull request as ready for review January 7, 2026 13:06
@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.32%. Comparing base (44f3847) to head (e090749).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4807      +/-   ##
==========================================
+ Coverage   93.28%   93.32%   +0.04%     
==========================================
  Files         148      148              
  Lines       20561    20557       -4     
  Branches     3570     3567       -3     
==========================================
+ Hits        19180    19185       +5     
+ Misses        924      919       -5     
+ Partials      457      453       -4     

☔ 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.

@vyperlang vyperlang deleted a comment from chatgpt-codex-connector bot Jan 8, 2026
@vyperlang vyperlang deleted a comment from chatgpt-codex-connector bot Jan 8, 2026
@vyperlang vyperlang deleted a comment from chatgpt-codex-connector bot Jan 8, 2026
ops.extend([pred.label, val])

assert len(ops) == 2 * len(existing_value), (ops, existing_value, inst)
if len(ops) != 2 * len(existing_value):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this has to be the if and not assert. All the cases should be already short circuited in the for beforehand.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see f6c4304

charles-cooper and others added 3 commits January 8, 2026 09:59
- Fix phi operand count check: use len(preds) instead of
  len(existing_value) to handle cases where multiple predecessors
  store the same value
- Add _normalize_operand to ensure consistent lattice keys for
  aliased pointers
- Remove dead code (memloc is None check, store_opcode is not None)
- Restore assertions for impossible states (analysis bugs) while
  keeping legitimate bail-outs as returns
- Add tests for nested diamonds, multi-predecessor phi, and aliased
  pointers

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Copy link
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved, waiting for any more feedback from @HodanPlodky

charles-cooper and others added 2 commits January 9, 2026 20:14
Put `param` instructions first in entry blocks for tests that use the
hevm harness. `venom_to_assembly.py:_prepare_stack_for_function` breaks
on the first non-param instruction, so params must come before other
instructions for stack setup to work correctly.

Also remove `hevm=False` from tests that were previously disabled due to
this issue.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
All `param` instructions must be contiguous at the start of entry block.
The `%alias = %ptr` assignment was between two params, breaking stack setup.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

3 participants