Skip to content

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

Open
naveen-seth wants to merge 4 commits into
mainfrom
naveen/legalization-generic-widening
Open

naveen-seth wants to merge 4 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.

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>
@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 and others added 2 commits September 15, 2026 14:19
Co-authored-by: Luigi Rinaldi <82770895+luigirinaldi@users.noreply.github.com>
@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.

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