https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115863
--- Comment #7 from Richard Biener ---
(In reply to Uroš Bizjak from comment #6)
> Please note that w/o .SAT_TRUNC the compiler is able to optimize hot loop in
> compress2 to:
>
>[local count: 536870912]:
> _18 = MIN_EXPR ;
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115863
Uroš Bizjak changed:
What|Removed |Added
CC||rguenth at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115863
--- Comment #5 from Sergei Trofimovich ---
(In reply to H.J. Lu from comment #3)
> This may be fixed by r15-1954.
Great find! That fix repairs `zlib` and `perl` for me.
Here is the extracted example from zlib-1.3.1 for completeness in case
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115863
--- Comment #4 from Li Pan ---
(In reply to H.J. Lu from comment #3)
> This may be fixed by r15-1954.
Thank HJ, this makes much sense to me.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115863
--- Comment #3 from H.J. Lu ---
This may be fixed by r15-1954.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115863
--- Comment #2 from H.J. Lu ---
See:
https://gcc.gnu.org/pipermail/gcc-regression/2024-July/080225.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115863
--- Comment #1 from Li Pan ---
Thanks for reporting this.
It should be this "stream.avail_out = left > (uLong)max ? max : (uInt)left;"
which HIT the .SAT_TRUNC. Aka below pattern.
+/* Unsigned saturation truncate, case 2, sizeof (WT) >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115863
Andrew Pinski changed:
What|Removed |Added
Target Milestone|--- |15.0
Keywords|