Skip to content

[Util] Add folder for assumes of X / C * C - #21168

Merged
qedawkins merged 1 commit into
iree-org:mainfrom
qedawkins:util_folder
Jun 24, 2025
Merged

qedawkins merged 1 commit into
iree-org:mainfrom
qedawkins:util_folder

Conversation

@qedawkins

Copy link
Copy Markdown
Contributor

This folding is not possible in general because C * (X udiv C) may clamp, but if a util.assume.int indicates that X is divisible by C, we can fold away the divide and multiply.

This folding is not possible in general because C * (X udiv C) may
clamp, but if a `util.assume.int` indicates that X is divisible by C, we
can fold away the divide and multiply.
@qedawkins
qedawkins requested a review from benvanik as a code owner June 24, 2025 02:23
@qedawkins
qedawkins merged commit 94b2df6 into iree-org:main Jun 24, 2025
@qedawkins
qedawkins deleted the util_folder branch June 24, 2025 15:04
AWoloszyn pushed a commit that referenced this pull request Dec 1, 2025
This folding is not possible in general because C * (X udiv C) may
clamp, but if a `util.assume.int` indicates that X is divisible by C, we
can fold away the divide and multiply.
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