Using UNSPEC for vector compare to mask register.
authorliuhongt <hongtao.liu@intel.com>
Mon, 20 Jul 2020 02:13:58 +0000 (10:13 +0800)
committerliuhongt <hongtao.liu@intel.com>
Mon, 10 Aug 2020 02:28:08 +0000 (10:28 +0800)
commit99e4891ed552aca4ca147671701edd0b31015f66
tree3820cd9371b5f8c93c9197e0bb7011c80bd20248
parent39984c4e61b02a09b2d6c995505ce65ac2f7d872
Using UNSPEC for vector compare to mask register.

For rtx like (eq:HI (V8SI 90) (V8SI 91)), cse will take it as a
boolean value and try to do some optimization. But it is not true for
vector compare, also other places in rtl passes hold the same
assumption.

2020-07-20  Hongtao Liu  <hongtao.liu@intel.com>

gcc/
PR target/96243
* config/i386/i386-expand.c (ix86_expand_sse_cmp): Refine for
maskcmp.
(ix86_expand_mask_vec_cmp): Change prototype.
* config/i386/i386-protos.h (ix86_expand_mask_vec_cmp): Change prototype.
* config/i386/i386.c (ix86_print_operand): Remove operand
modifier 'I'.
* config/i386/sse.md
(*<avx512>_cmp<mode>3<mask_scalar_merge_name><round_saeonly_name>): Deleted.
(*<avx512>_cmp<mode>3<mask_scalar_merge_name>): Ditto.
(*<avx512>_ucmp<mode>3<mask_scalar_merge_name>): Ditto.
(*<avx512>_ucmp<mode>3<mask_scalar_merge_name>,
avx512f_maskcmp<mode>3): Ditto.

gcc/testsuite
* gcc.target/i386/pr92865-1.c: Adjust testcase.
gcc/config/i386/i386-expand.c
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/sse.md
gcc/testsuite/gcc.target/i386/pr92865-1.c