This is an archive of the discontinued LLVM Phabricator instance.

[LoopUnroll] Simplify induction variables after peeling too.
ClosedPublic

Authored by fhahn on Feb 28 2018, 9:58 AM.

Details

Summary

Loop peeling also has an impact on the induction variables, so we should
benefit from induction variable simplification after peeling too.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Feb 28 2018, 9:58 AM
efriedma added inline comments.Feb 28 2018, 11:47 AM
test/Transforms/LoopUnroll/peel-loop-conditions.ll
2 ↗(On Diff #136322)

Putting -simplifycfg is probably more confusing than helpful, in terms of understanding what the pass actually does.

47 ↗(On Diff #136322)

We don't peel this loop on master...? Or is this based on top of D43876?

Thanks Eli, will update tomorrow.

test/Transforms/LoopUnroll/peel-loop-conditions.ll
47 ↗(On Diff #136322)

Yep, the test case is the modified case from D43876. I've linked it now, sorry for the confusion. If D43876 is hold up, I think it shouldn't be too hard to come up with a different test case.

fhahn updated this revision to Diff 138563.Mar 15 2018, 8:31 AM

rebased with latest version of D43876

This revision is now accepted and ready to land.Mar 22 2018, 3:05 PM
This revision was automatically updated to reflect the committed changes.