[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together

2024-08-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW

[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together

2022-02-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together

2022-02-17 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 --- Comment #5 from Hongtao.liu --- PR50374? It's from Fotran minloc/maxloc intrinsics.

[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together

2022-02-17 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever confirmed|0

[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together

2022-02-17 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 --- Comment #3 from Hongtao.liu --- (In reply to Hongtao.liu from comment #2) > One possible way is sink maxInt = src[i] out of loop, when there's > synchronised index search in the loop, just like below. > For scalar part, it's 1 conditional m

[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together

2022-02-16 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 --- Comment #2 from Hongtao.liu --- One possible way is sink maxInt = src[i] out of loop, when there's synchronised index search in the loop, just like below. int max (int *src, int n, int *position) { int maxInt; int maxIndex; int i;

[Bug tree-optimization/104579] vectorizer failed to reduce max & index search together

2022-02-16 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104579 --- Comment #1 from Hongtao.liu --- cut /* Function vect_is_simple_reduction (1) Detect a cross-iteration def-use cycle that represents a simple reduction computation. We look for the following pattern: loop_