Fix a bug when every second instruction wasn't sinked because the iterator was incremented over it
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Transforms/Scalar/IndVarSimplify.cpp | ||
|---|---|---|
| 2344 | I'd instead do this change as:
This would make the entry invariant into the loop "I points to one past the instruction we want to sink", and the I-- in the beginning of the loop body would do the right thing. | |
| lib/Transforms/Scalar/IndVarSimplify.cpp | ||
|---|---|---|
| 2344 | Agree. I was just trying to make the patch simple. | |
At the end of the loop I is pointing at the next instruction to consider, so this decrement will skip it