[Bug target/109690] bad SLP vectorization on zen

2023-05-06 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109690 Alexander Monakov changed: What|Removed |Added CC||amonakov at gcc dot gnu.org ---

[Bug target/109690] bad SLP vectorization on zen

2023-05-05 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109690 --- Comment #7 from Jan Hubicka --- Thanks a lot! There however still seems to be problem with vectorization On zen4 i now get: jh@ryzen4:~/gcc/build/gcc> ./xgcc -B ./ -O2 -march=native slp.c ; perf stat ./a.out Performance counter stats

[Bug target/109690] bad SLP vectorization on zen

2023-05-05 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109690 --- Comment #6 from Uroš Bizjak --- The missing pattern was committed as part of: commit r14-493-g919642fa4b2bc4c32910336dd200d53766801c80 Author: Uros Bizjak Date: Fri May 5 14:10:18 2023 +0200 i386: Introduce mulv2si3 instruction

[Bug target/109690] bad SLP vectorization on zen

2023-05-04 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109690 --- Comment #5 from Uroš Bizjak --- Created attachment 55002 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55002=edit Patch that introduces mulv2si3 The compiled code with -march=znver1 is now the same as without the flag: loop:

[Bug target/109690] bad SLP vectorization on zen

2023-05-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109690 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug target/109690] bad SLP vectorization on zen

2023-05-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109690 --- Comment #3 from Andrew Pinski --- So in the case of without -march, we get: first: /app/example.cpp:14:24: note: Cost model analysis for part in loop 0: Vector cost: 28 Scalar cost: 24 so we reject that and then we try it again and

[Bug target/109690] bad SLP vectorization on zen

2023-05-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109690 --- Comment #2 from Andrew Pinski --- Even more interesting is: for (int i = 0; i < 3; i++) a[i] = ((unsigned)a[i]) << 1; Produces different code .

[Bug target/109690] bad SLP vectorization on zen

2023-05-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109690 --- Comment #1 from Andrew Pinski --- Without -march=znver1, we get: vect__10.6_9 = MEM [(int *)]; vect_patt_13.7_8 = VIEW_CONVERT_EXPR(vect__10.6_9); vect_patt_19.8_1 = vect_patt_13.7_8 << 1; vect_patt_25.9_2 =