https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126270
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Known to work| |15.3.0
Target Milestone|--- |16.2
Summary|wrong code at -O{2,3} on |[16/17 Regression] wrong
|x86_64-linux-gnu |code at -O{2,3} on
|(nondeterministic hang) |x86_64-linux-gnu
| |(nondeterministic hang)
Last reconfirmed| |2026-07-15
--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
The gimple level looks fine.
But the generated code looks to be missing something.
In GCC 15.3.0 we had:
(no zeroing the upper parts of r9b before the setne)
```
setne r9b
...
je .L8
mov eax, r9d
.L8:
not eax
movsx eax, al
```
While in GCC 16/17 (code gen is the same there):
```
setne r8b
...
je .L8
mov eax, r8d
.L8:
not eax
add eax, esi
```