This is an archive of the discontinued LLVM Phabricator instance.

Loop predication expand both sides of the widened condition
ClosedPublic

Authored by apilipenko on Feb 17 2017, 8:13 AM.

Details

Summary

This is a fix for a loop predication bug which resulted in malformed IR generation.

Loop invariant side of the widened condition is not guaranteed to be available in the preheader as is, so we need to expand it as well. See added unsigned_loop_0_to_n_hoist_length test for example.

Diff Detail

Repository
rL LLVM

Event Timeline

apilipenko created this revision.Feb 17 2017, 8:13 AM
sanjoy accepted this revision.Feb 18 2017, 2:39 PM

lgtm!

This revision is now accepted and ready to land.Feb 18 2017, 2:39 PM
This revision was automatically updated to reflect the committed changes.