]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/104931 - mitigate niter analysis issue
authorRichard Biener <rguenther@suse.de>
Wed, 16 Mar 2022 13:53:06 +0000 (14:53 +0100)
committerRichard Biener <rguenther@suse.de>
Wed, 23 Mar 2022 08:00:10 +0000 (09:00 +0100)
commitd1f4dfd409dedf4d00ca7be001cf757d0d6e82f4
tree766106db80c5f67f5fe5165c2d667015305a5857
parentea4f664a40f853851177e0cc4e47fedeaad8f70a
tree-optimization/104931 - mitigate niter analysis issue

The following backports a pointer associating pattern from trunk
that mitigates an issue with number_of_iterations_lt_to_ne in
which context we fail to fold a comparison but succeed in folding
a related subtraction.  In the failure mode this results in
a loop wrongly assumed looping with a bogus number of iterations,
resulting in crashing of the premake application on start.

With the backported simplification we are able to fold the
comparison and correctly compute the loop as not iterating.

I have failed to create a standalone testcase.  I belive part
of the issue is still latent but I have failed to nail down
the issue exactly.  Still I believe the backporting of the
mitigation patch is the most sensible and safe thing at this
point.

2022-03-16  Richard Biener  <rguenther@suse.de>

PR tree-optimization/104931
* match.pd ((ptr) (x p+ y) p+ z -> (ptr) (x p+ (y + z))): New GENERIC
simplification.
gcc/match.pd