public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/96891] New: [AVX512] For vector compare to dest vector, avx512 vector compare could be lowered to avx version
@ 2020-09-02  3:10 crazylht at gmail dot com
  2021-01-04  6:51 ` [Bug target/96891] " crazylht at gmail dot com
  2021-01-22  4:37 ` cvs-commit at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: crazylht at gmail dot com @ 2020-09-02  3:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96891
           Summary: [AVX512] For vector compare to dest vector, avx512
                    vector compare could be lowered to avx version
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: crazylht at gmail dot com
  Target Milestone: ---
            Target: x86_64-*-* i?86-*-*

cat test.cpp

---
typedef float v8sf __attribute__ ((vector_size (32)));
v8sf test4(v8sf a, v8sf b)
{
    return a >= b;
}
---

gcc -O2 -mavx512f -mavx512vl -S 

---
test4:
        vcmpps  k1, ymm1, ymm0, 2
        vpternlogd      ymm0{k1}{z}, ymm0, ymm0, 0x81
        ret
---

gcc -O2 -mavx

---
test4:
        vcmpleps        ymm0, ymm1, ymm0
        ret
---

Add peephole 2 handle this?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/96891] [AVX512] For vector compare to dest vector, avx512 vector compare could be lowered to avx version
  2020-09-02  3:10 [Bug target/96891] New: [AVX512] For vector compare to dest vector, avx512 vector compare could be lowered to avx version crazylht at gmail dot com
@ 2021-01-04  6:51 ` crazylht at gmail dot com
  2021-01-22  4:37 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: crazylht at gmail dot com @ 2021-01-04  6:51 UTC (permalink / raw)
  To: gcc-bugs

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

Hongtao.liu <crazylht at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Hongtao.liu <crazylht at gmail dot com> ---
Dup.

*** This bug has been marked as a duplicate of bug 98348 ***

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug target/96891] [AVX512] For vector compare to dest vector, avx512 vector compare could be lowered to avx version
  2020-09-02  3:10 [Bug target/96891] New: [AVX512] For vector compare to dest vector, avx512 vector compare could be lowered to avx version crazylht at gmail dot com
  2021-01-04  6:51 ` [Bug target/96891] " crazylht at gmail dot com
@ 2021-01-22  4:37 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-22  4:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by hongtao Liu <liuhongt@gcc.gnu.org>:

https://gcc.gnu.org/g:ee78c20e74d30284fee36e22a64e86e45e676029

commit r11-6849-gee78c20e74d30284fee36e22a64e86e45e676029
Author: liuhongt <hongtao.liu@intel.com>
Date:   Fri Dec 18 15:56:06 2020 +0800

    Lower AVX512 vector comparison to AVX version when dest is vector.

    gcc/ChangeLog:

            PR target/96891
            PR target/98348
            * config/i386/sse.md (VI_128_256): New mode iterator.
            (*avx_cmp<mode>3_1, *avx_cmp<mode>3_2, *avx_cmp<mode>3_3,
             *avx_cmp<mode>3_4, *avx2_eq<mode>3, *avx2_pcmp<mode>3_1,
             *avx2_pcmp<mode>3_2, *avx2_gt<mode>3): New
            define_insn_and_split to lower avx512 vector comparison to avx
            version when dest is vector.
            (*<avx512>_cmp<mode>3,*<avx512>_cmp<mode>3,*<avx512>_ucmp<mode>3):
            define_insn_and_split for negating the comparison result.
            * config/i386/predicates.md (float_vector_all_ones_operand):
            New predicate.
            * config/i386/i386-expand.c (ix86_expand_sse_movcc): Use
            general NOT operator without UNSPEC_MASKOP.

    gcc/testsuite/ChangeLog:

            PR target/96891
            PR target/98348
            * gcc.target/i386/avx512bw-pr96891-1.c: New test.
            * gcc.target/i386/avx512f-pr96891-1.c: New test.
            * gcc.target/i386/avx512f-pr96891-2.c: New test.
            * gcc.target/i386/avx512f-pr96891-3.c: New test.
            * g++.target/i386/avx512f-pr96891-1.C: New test.
            * gcc.target/i386/bitwise_mask_op-3.c: Adjust testcase.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-22  4:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-02  3:10 [Bug target/96891] New: [AVX512] For vector compare to dest vector, avx512 vector compare could be lowered to avx version crazylht at gmail dot com
2021-01-04  6:51 ` [Bug target/96891] " crazylht at gmail dot com
2021-01-22  4:37 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).