https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120069
Filip Kastl <pheeck at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[16 Regression] Yes another |[16 Regression] Yes another
|imagick -march=native -flto |imagick -march=native -flto
|-Ofast + PGO regression |-Ofast + PGO regression
|between |since
|g:1c0cbc1b300e08df5ebfce00a |r16-270-ga0a64aa5da0af5
|7195890d78f2064 and |
|g:55b01e17c793688a2878fa43a |
|76df1266153b438 |
CC| |hjl at gcc dot gnu.org
--- Comment #9 from Filip Kastl <pheeck at gcc dot gnu.org> ---
The Zen2 slowdowns bisect to:
commit a0a64aa5da0af5ecb022675cdb9140ccfa098ce3 (HEAD)
Author: H.J. Lu <[email protected]>
AuthorDate: Tue Nov 12 09:03:31 2024 +0800
Commit: H.J. Lu <[email protected]>
CommitDate: Tue Apr 29 15:06:52 2025 +0800
i386: Add ix86_expand_unsigned_small_int_cst_argument
When passing 0xff as an unsigned char function argument with the C frontend
promotion, expand_normal used to get
<integer_cst 0x7fffe6aa23a8 type <integer_type 0x7fffe98225e8 int> constant
255>
and returned the rtx value using the sign-extended representation:
(const_int 255 [0xff])
But after
commit a670ebde3995481225ec62b29686ec07a21e5c10
Author: H.J. Lu <[email protected]>
Date: Thu Nov 21 07:54:35 2024 +0800
Drop targetm.promote_prototypes from C, C++ and Ada frontends
expand_normal now gets
<integer_cst 0x7fffe9824018 type <integer_type 0x7fffe9822348 unsigned char
> constant 255>
and returns
(const_int -1 [0xffffffffffffffff])
which doesn't work with the predicates nor the instruction templates which
expect the unsigned expanded value. Extract the unsigned char and short
integer constants to return
(const_int 255 [0xff])
so that the expanded value is always unsigned, without the C frontend
promotion.
PR target/117547
* config/i386/i386-expand.cc
(ix86_expand_unsigned_small_int_cst_argument):
New function.
(ix86_expand_args_builtin): Call
ix86_expand_unsigned_small_int_cst_argument to expand the argument
before calling fixup_modeless_constant.
(ix86_expand_round_builtin): Likewise.
(ix86_expand_special_args_builtin): Likewise.
(ix86_expand_builtin): Likewise.
Signed-off-by: H.J. Lu <[email protected]>
So the arm slowdowns will most probably be something else.