[Fix][S-TIR] Preserve general reduction predicates - #20242
Merged
Conversation
Rebuild decomposed reduction predicates recursively across conjunctions. Keep clauses independent of discarded loops and drop only clauses that depend on them, so non-< comparisons and predicates that reference variables on either side remain valid.
Derive initialization predicates only from separable conjunction clauses. Preserve clauses over retained loops, omit clauses over discarded loops, and reject clauses that couple the two sets instead of silently widening the initialization domain.\n\nAdd coverage for general comparisons, separable boolean expressions, and defensive behavior when prerequisite schedule checks are disabled.
Split and rfactor naturally produce tail predicates that combine a discarded reduction chunk with a retained factor lane. Decomposed initialization must cover every retained lane, so drop any conjunction clause referencing the discarded loop instead of rejecting mixed clauses.\n\nAdd a split-to-rfactor regression matching the DLight failure shape.
tlopex
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebuild decomposed reduction predicates recursively across conjunctions. Preserve clauses independent of discarded loops and drop clauses that reference discarded loops. This supports comparisons beyond
<and detects loop variables on either operand.Tail predicates generated by
splitandrfactor, such asouter * factor + inner < extent, are omitted from initialization when they reference a discarded reduction loop, while remaining on the update block.