This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Properly handle the case of a non-constant start with a zero accum in ScalarEvolution::createAddRecFromPHIWithCastsImpl
ClosedPublic

Authored by dneilson on Oct 11 2017, 11:24 AM.

Details

Summary

This patch fixes an error in the patch to ScalarEvolution::createAddRecFromPHIWithCastsImpl
made in D37265. In that patch we handle the cases where the either the start or accum values can be
zero after truncation. But, we assume that the start value must be a constant if the accum is
zero. This is clearly an erroneous assumption. This change removes that assumption.

Diff Detail

Repository
rL LLVM

Event Timeline

dneilson created this revision.Oct 11 2017, 11:24 AM
sanjoy accepted this revision.Oct 11 2017, 11:45 AM

LGTM

This revision is now accepted and ready to land.Oct 11 2017, 11:45 AM
This revision was automatically updated to reflect the committed changes.