This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/70251] Wrong code with -O3 -march=skylake-avx512.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70251

--- Comment #4 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Ilya Enkovich from comment #2)
> Here is a responsible match.pd pattern:
> 
> /* A + (B vcmp C ? 1 : 0) -> A - (B vcmp C), since vector comparisons
>    return all-1 or all-0 results.  */

Since we don't simplify (x<y)?-1:0 to (x<y) anymore for vectors (on any
platform), it seems weird to keep this optimization at all. Maybe it should be
instead:

A + (B vcmp C ? 1 : 0)  ->  A - (B vcmp C ? -1 : 0)

?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]