Skip to content

feat(legalization): make llvm.add widening proof width-generic (bounded) - #1471

Merged
naveen-seth merged 6 commits into
mainfrom
naveen/legalization-generic-widening
Sep 22, 2026
Merged

naveen-seth merged 6 commits into
mainfrom
naveen/legalization-generic-widening

Conversation

@naveen-seth

Copy link
Copy Markdown
Contributor

This makes the add_widening proof generic over widths up to a bounded limit using pbv_decide.
This is currently bounded to 16 bits for performance reasons; large widths (around 64 bits and above) time out.

@naveen-seth
naveen-seth force-pushed the naveen/legalization-generic-widening branch from 26a1a9b to dbb6e8e Compare September 15, 2026 10:24

@luigirinaldi luigirinaldi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! modulo the minor nit. The constructor ... is a bit ugly atm could also be replaced by:

refine ⟨by simp, fun _ _ => ?_⟩
intros
pbv_decide 16
bv_decide

More in general I should fix pbv_decide to handle it without any of this trickery.

Comment thread Veir/Passes/Legalization/Proofs.lean Outdated
@naveen-seth
naveen-seth force-pushed the naveen/legalization-generic-widening branch from ffbc5af to 3b3babe Compare September 16, 2026 16:57
@naveen-seth

Copy link
Copy Markdown
Contributor Author

After #1475 has landed, the performance should be good enough to increase this to 64 bit.

@nchappe nchappe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice, thanks! Note that #1483 has landed today, so you may be able to increase the upper bound now.

naveen-seth and others added 6 commits September 22, 2026 11:36
This makes the add_widening proof generic over widths up to a bounded limit
using pbv_decide.
This is currently bounded to 16 bits for performance reasons; large
widths (around 64 bits and above) time out.

Co-authored-by: Luigi Rinaldi <82770895+luigirinaldi@users.noreply.github.com>
Co-authored-by: Luigi Rinaldi <82770895+luigirinaldi@users.noreply.github.com>
@naveen-seth
naveen-seth force-pushed the naveen/legalization-generic-widening branch from 4186fa8 to 833be49 Compare September 22, 2026 10:43
@naveen-seth
naveen-seth added this pull request to the merge queue Sep 22, 2026
Merged via the queue into main with commit cc14571 Sep 22, 2026
5 of 6 checks passed
@naveen-seth
naveen-seth deleted the naveen/legalization-generic-widening branch September 22, 2026 10:47
axelcool1234 pushed a commit to axelcool1234/veir that referenced this pull request Sep 23, 2026
…c (bounded)" (opencompl#1524)

Reverts opencompl#1471

Auto-merge seems to go through even when the CI fails.
tobiasgrosser pushed a commit that referenced this pull request Sep 24, 2026
…ed) (#1471)

This makes the add_widening proof generic over widths up to a bounded
limit using `pbv_decide`.
This is currently bounded to 16 bits for performance reasons; large
widths (around 64 bits and above) time out.

---------

Co-authored-by: Luigi Rinaldi <82770895+luigirinaldi@users.noreply.github.com>
tobiasgrosser pushed a commit that referenced this pull request Sep 24, 2026
…c (bounded)" (#1524)

Reverts #1471

Auto-merge seems to go through even when the CI fails.
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