https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66678
--- Comment #5 from rguenther at suse dot de ---
On Wed, 9 Aug 2023, pinskia at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66678
>
> --- Comment #4 from Andrew Pinski ---
> So in GCC 12+ after evrp
> # RANGE [0, 42
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66678
--- Comment #4 from Andrew Pinski ---
So in GCC 12+ after evrp
# RANGE [0, 4294967294] NONZERO 4294967295
_1 = (long unsigned intD.16) i_9;
# RANGE [0, 17179869176] NONZERO 17179869180
_2 = _1 * 4;
...
# RANGE [1, 4294967295]
i_17 = i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66678
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization
Status|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66678
--- Comment #3 from Richard Biener ---
(In reply to vries from comment #2)
> Created attachment 35878 [details]
> tentative patch
That single-use case is awfully special ... just add an unrelated use
to the function and we no longer optimize aga
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66678
--- Comment #2 from vries at gcc dot gnu.org ---
Created attachment 35878
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35878&action=edit
tentative patch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66678
--- Comment #1 from vries at gcc dot gnu.org ---
I.
(In reply to vries from comment #0)
> AFAIU:
> - the loop iv i_1 has range [0, 4294967294], and
This bit is incorrect. i_1 can actually be 4294967295.
II.
With this demonstrator patch:
...