Check that we're using SCEV for the same loop we're simulating. Otherwise, we might try to use the iteration number of the current loop in SCEV expressions for inner/outer loops IVs, which is clearly incorrect.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Minor drop by comments inline
lib/Analysis/LoopUnrollAnalyzer.cpp | ||
---|---|---|
40 ↗ | (On Diff #49135) | Nit: why not change this to if (!AR || AR->getLoop() != L)? |
unittests/Analysis/UnrollAnalyzer.cpp | ||
132 ↗ | (On Diff #49135) | Do we actually need the trailing newlines? I don't think the parser actually cares, and they're somewhat distracting. |
Comment Actions
lgtm
I don't know this area of code well, but this change looks fairly simple and obvious
Comment Actions
Thanks! It looks like the newlines are actually necessary, so I returned them in the committed patch.
Michael