Skip to content

[FIX][TIRx] Avoid stale constraints from mutable memory predicates - #20393

Merged
tqchen merged 1 commit into
apache:mainfrom
tlopex:fix/mutable-memory-predicates-main
Sep 20, 2026
Merged

tqchen merged 1 commit into
apache:mainfrom
tlopex:fix/mutable-memory-predicates-main

Conversation

@tlopex

@tlopex tlopex commented Sep 20, 2026

Copy link
Copy Markdown
Member

This pr fixes incorrect simplification of conditions that read mutable memory. An enclosing branch can currently cause StmtSimplify to remove a nested loop bound even when stores inside the branch or loop change the value being tested. Assertions can similarly cause later expressions to be folded incorrectly.

Only record pure branch and assertion predicates as analyzer facts, and exclude memory-dependent branch conditions from iteration predicates.

@tqchen
tqchen merged commit c067b74 into apache:main Sep 20, 2026
8 checks passed
MasterJH5574 pushed a commit that referenced this pull request Sep 22, 2026
…20393)

This pr fixes incorrect simplification of conditions that read mutable
memory. An enclosing branch can currently cause `StmtSimplify` to remove
a nested loop bound even when stores inside the branch or loop change
the value being tested. Assertions can similarly cause later expressions
to be folded incorrectly.

Only record pure branch and assertion predicates as analyzer facts, and
exclude memory-dependent branch conditions from iteration predicates.
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