[Bug tree-optimization/110252] [14 Regression] Wrong code at -O2/3/s on x86_64-linux-gnu
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jun 15 03:11:09 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110252
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
here is another testcase which is reduced from sel-sched.cc which we currently
miscompile:
```
[[gnu::noipa]]
int g(int min_need_stall)
{
return min_need_stall < 0 ? 1 : ((min_need_stall) < (1) ? (min_need_stall) :
(1));
}
int main(void)
{
for(int i = -100; i <= 100; i++)
{
int t = g(i);
if (t != (i!=0))
__builtin_abort();
}
}
```
Note g really could be reduced down to (min_need_stall != 0) but we don't do
that currently (nor does clang).
More information about the Gcc-bugs
mailing list