[Bug tree-optimization/106293] [13/14 Regression] 456.hmmer at -Ofast -march=native regressed by 19% on zen2 and zen3 in July 2022
hubicka at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 27 21:38:39 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106293
--- Comment #16 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
It is really hard to make loop splitting to do something.
It does not like canonicalized invariant variables since loop exit condition
should not be NE_EXPR and it does not like when VRP turns LT/GT into NE.
This is what happens in hmmer. There is loop iterating 100 times and splitting
happens just before last BB
int M = 100;
void
__attribute__ ((noinline,noipa))
do_something()
{
}
void
__attribute__ ((noinline,noipa))
do_something2()
{
}
__attribute__ ((noinline,noipa))
void test1 (int n)
{
if (n <= 0 || n > 100000)
return;
for (int i = 0; i <= n; i++)
if (i < n)
do_something ();
else
do_something2 ();
}
int
main(int, char **)
{
for (int i = 0 ; i < 1000; i++)
test1(M);
return 0;
}
More information about the Gcc-bugs
mailing list