This is an archive of the discontinued LLVM Phabricator instance.

[LoopUnroll] First form LCSSA, then loop-simplify
ClosedPublic

Authored by mkuper on Jan 23 2017, 3:31 PM.

Details

Summary

Running non-LCSSA-preserving loop-simplify followed by LoopSimplify on (roughly) the same loop is incorrect, since LoopSimplify may break LCSSA arbitrarily higher in the loop nest.
Instead, run LCSSA first, and then run LCSSA-perserving LoopSimplify on the result.

This fixes PR31718.

Diff Detail

Repository
rL LLVM

Event Timeline

mkuper created this revision.Jan 23 2017, 3:31 PM
chandlerc accepted this revision.Jan 23 2017, 3:42 PM

LGTM!

Thanks, I would never have imagined this was hiding behind the 'true' I changed in my patch.

This revision is now accepted and ready to land.Jan 23 2017, 3:42 PM
This revision was automatically updated to reflect the committed changes.