This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/70251] Wrong code with -O3 -march=skylake-avx512.
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 16 Mar 2016 15:30:41 +0000
- Subject: [Bug tree-optimization/70251] Wrong code with -O3 -march=skylake-avx512.
- Auto-submitted: auto-generated
- References: <bug-70251-4 at http dot gcc dot gnu dot org/bugzilla/>
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)
?