Page MenuHomePhabricator

[IndVarSimply] Fix assert/release build difference.

Authored by Meinersbur on Feb 18 2020, 5:43 PM.



In builds with assertions enabled (!NDEBUG), IndVarSimplify has an additional query to ScalarEvolution which may change future SCEV queries since it fills the internal cache differently. The result is actually only used when -verify-indvars. We fix the issue by only calling SE->getBackedgeTakenCount(L) if -verify-indvars is enabled such that only -verify-indvars shows the behavior, but not debug builds themselves. Also add a remark to the description of -verify-indvars about this behavior.


Diff Detail

Event Timeline

Meinersbur created this revision.Feb 18 2020, 5:43 PM
  • Add test case

looks good to me, except for one minor issue in the testcase.


Shouldn't this be 'IR-LABEL:' ?

Meinersbur marked an inline comment as done.
  • Fix mislabeling in test case
reames accepted this revision.Feb 19 2020, 12:06 PM


This revision is now accepted and ready to land.Feb 19 2020, 12:06 PM
This revision was automatically updated to reflect the committed changes.