You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains 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
@asterite you may be interested in some of my notes from the last time I looked at this problem: https://hackmd.io/@JakeF/S1FA9rTnh#Better-Loop-Optimizations. I thought I had a solution originally but it ended up being broken (only somewhat implicitly stated by the problems at the bottom being unfinished)
@asterite we sometimes do loop unrolling in unconstrained code now, so you can "fix" that example to get it to not optimize by preventing loop unrolling. I found adding a println does the trick:
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.
Description
Problem
Related to #6971
Summary
This just adds an unfinished test with a small SSA snippet that I believe could be optimized out.
Next I'll check the mem2reg code to see if I can understand why it's not optimizing it.
Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmt
on default settings.