This is an archive of the discontinued LLVM Phabricator instance.

[SCEV] Use isKnownViaNonRecursiveReasoning for smax simplification
ClosedPublic

Authored by loladiro on Apr 25 2019, 6:13 PM.

Details

Summary

Commit
rL331949: SCEV] Do not use induction in isKnownPredicate for simplification umax

changed the codepath for umax from isKnownPredicate to
isKnownViaNonRecursiveReasoning to avoid compile time blow up (and as
I found out also stack overflows). However, there is an exact copy of
the code for umax that was lacking this change. In D50167 I want to unify
these codepaths, but to avoid that being a behavior change for the smax
case, pull this independent bit out of it.

Diff Detail

Repository
rL LLVM

Event Timeline

loladiro created this revision.Apr 25 2019, 6:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2019, 6:13 PM
Herald added a subscriber: javed.absar. · View Herald Transcript
sanjoy accepted this revision.Apr 28 2019, 12:39 PM

and as I found out also stack overflows

For posterity, do you have some example IR and/or stack traces that you could attach to the commit message, or make a test case out of?

This revision is now accepted and ready to land.Apr 28 2019, 12:39 PM

and as I found out also stack overflows

For posterity, do you have some example IR and/or stack traces that you could attach to the commit message, or make a test case out of?

I looked around in my notes from back when I did that patch, but doesn't look like I recorded it. I think all I did was try changing umax back to isKnownPredicate and running the test suite.

This revision was automatically updated to reflect the committed changes.