[Bug tree-optimization/107715] TSVC s161 and s277 for double runs at zen4 30 times slower when vectorization is enabled

2022-11-21 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107715

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2022-11-21
 Ever confirmed|0   |1
 CC||marxin at gcc dot gnu.org
 Status|UNCONFIRMED |NEW

[Bug tree-optimization/107715] TSVC s161 and s277 for double runs at zen4 30 times slower when vectorization is enabled

2022-11-16 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107715

Jan Hubicka  changed:

   What|Removed |Added

Summary|TSVC s161 for double runs   |TSVC s161 and s277 for
   |at zen4 30 times slower |double runs at zen4 30
   |when vectorization is   |times slower when
   |enabled |vectorization is enabled

--- Comment #4 from Jan Hubicka  ---
This looks to be same issue but also an regression wrt GCC 7.5.0

typedef double real_t;
#define iterations 10
#define LEN_1D 32000
#define LEN_2D 256
real_t a[LEN_1D],b[LEN_1D],c[LEN_1D],d[LEN_1D],e[LEN_1D];
real_t qq;
int
main(void)
{


for (int nl = 0; nl < iterations; nl++) {
for (int i = 0; i < LEN_1D-1; i++) {
if (a[i] >= (real_t)0.) {
goto L20;
}
if (b[i] >= (real_t)0.) {
goto L30;
}
a[i] += c[i] * d[i];
L30:
b[i+1] = c[i] + d[i] * e[i];
L20:
;
}
}

return 1;
}
jh@alberti:~/tsvc/bin> gcc -Ofast -march=native tt4.c  ; time ./a.out

real0m0.879s
user0m0.879s
sys 0m0.000s
jh@alberti:~/tsvc/bin> /home/jh/trunk-install/bin/gcc -Ofast -march=native
tt4.c  ; time ./a.out

real0m1.742s
user0m1.741s
sys 0m0.000s
jh@alberti:~/tsvc/bin> clang -Ofast -march=native tt4.c  ; time ./a.out

real0m0.879s
user0m0.879s
sys 0m0.000s