This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && "SCEVAddRecExpr operand is not loop-invariant!")
AbandonedPublic

Authored by ABataev on Feb 6 2017, 8:22 AM.

Details

Reviewers
sanjoy
Summary

Sometimes during folding loop invariants the resulting add recurrence may become non-invariant. This may lead to crash during next folding of recurrences expected to be invariants, which are not.

Diff Detail

Event Timeline

ABataev created this revision.Feb 6 2017, 8:22 AM
sanjoy edited edge metadata.Feb 6 2017, 4:54 PM

Hi Alexey,

I did not understand the premise of this change -- how can the sum of two loop invariant values be a loop varying value? Can you give a specific isolated example? Or did I not misunderstand?

ABataev abandoned this revision.Feb 7 2017, 1:42 AM

Hi Alexey,

I did not understand the premise of this change -- how can the sum of two loop invariant values be a loop varying value? Can you give a specific isolated example? Or did I not misunderstand?

Hi Sanjoy, there is something has changed in LLVM and I can't reproduce the bug anymore. So I'm abandoning it