This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Fix isLoopEntryGuardedByCond usage
ClosedPublic

Authored by skatkov on Jan 17 2018, 4:01 AM.

Details

Summary

ScalarEvolution::isKnownPredicate invokes isLoopEntryGuardedByCond without check
that SCEV is available at entry point of the loop. it is incorrect and fixed by patch.

Diff Detail

Repository
rL LLVM

Event Timeline

skatkov created this revision.Jan 17 2018, 4:01 AM
mkazantsev accepted this revision.Jan 21 2018, 9:19 PM

LGTM with nits (see comments to the test).

test/Transforms/IndVarSimplify/inner-loop.ll
3 ↗(On Diff #130120)

Could you please give some more details on this bug here? It is not clear what problem are you addressing. Either a comment or a reference on bugs.llvm.com would work.

33 ↗(On Diff #130120)

should be -> should not be
due to in case -> because if

35 ↗(On Diff #130120)

Within a bug -> Due to the bug?
instrction -> instruction

37 ↗(On Diff #130120)

Maybe add CHECK-NOT: select i1 true?

This revision is now accepted and ready to land.Jan 21 2018, 9:19 PM
This revision was automatically updated to reflect the committed changes.