On Sat, Apr 19, 2025 at 4:16 PM Uros Bizjak <ubiz...@gmail.com> wrote: > > On Sat, Apr 19, 2025 at 7:22 AM H.J. Lu <hjl.to...@gmail.com> wrote: > > > > On Mon, Dec 2, 2024 at 6:27 AM H.J. Lu <hjl.to...@gmail.com> wrote: > > > > > > Add pcmpeq splitters to split > > > > > > (insn 5 3 7 2 (set (reg:V4SI 100) > > > (eq:V4SI (reg:V4SI 98) > > > (reg:V4SI 98))) 7910 {*sse2_eqv4si3} > > > (expr_list:REG_DEAD (reg:V4SI 98) > > > (expr_list:REG_EQUAL (eq:V4SI (const_vector:V4SI [ > > > (const_int -1 [0xffffffffffffffff]) repeated x4 > > > ]) > > > (const_vector:V4SI [ > > > (const_int -1 [0xffffffffffffffff]) repeated x4 > > > ])) > > > (nil)))) > > > > > > to > > > > > > (insn 8 3 7 2 (set (reg:V4SI 100) > > > (const_vector:V4SI [ > > > (const_int -1 [0xffffffffffffffff]) repeated x4 > > > ])) -1 > > > (nil)) > > > > > > gcc/ > > > > > > PR target/117863 > > > * config/i386/sse.md: Add pcmpeq splitters. > > > > > > gcc/testsuite/ > > > > > > PR target/117863 > > > * gcc.dg/rtl/i386/vector_eq-2.c: New test. > > > > > > Signed-off-by: H.J. Lu <hjl.to...@gmail.com> > > > --- > > > gcc/config/i386/sse.md | 36 +++++++++++ > > > gcc/testsuite/gcc.dg/rtl/i386/vector_eq-2.c | 71 +++++++++++++++++++++ > > > 2 files changed, 107 insertions(+) > > > create mode 100644 gcc/testsuite/gcc.dg/rtl/i386/vector_eq-2.c > > > > > > diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md > > > index 498a42d6e1e..4b19bc22a83 100644 > > > --- a/gcc/config/i386/sse.md > > > +++ b/gcc/config/i386/sse.md > > > @@ -17943,6 +17943,18 @@ (define_insn "*avx2_eq<mode>3" > > > (set_attr "prefix" "vex") > > > (set_attr "mode" "OI")]) > > > > > > +;; Don't remove memory operand to keep volatile memory. > > Perhaps we can use MEM_VOLATILE_P to also allow memory operands? > > > > +(define_split > > > + [(set (match_operand:VI_256 0 "register_operand") > > > + (eq:VI_256 > > > + (match_operand:VI_256 1 "register_operand") > > > + (match_operand:VI_256 2 "register_operand")))] > > > + "TARGET_AVX2 && rtx_equal_p (operands[1], operands[2])" > > > + [(set (match_dup 0) (match_dup 1))] > > > +{ > > > + operands[1] = CONSTM1_RTX (<MODE>mode); > > > +}) > > Single preparation statements should use double quotes, here and in other > cases. >
This isn't needed anymore with commit 546f28f83ceba74dc8bf84b0435c0159ffca971a Author: Richard Sandiford <richard.sandif...@arm.com> Date: Mon Apr 7 08:03:46 2025 +0100 simplify-rtx: Fix shortcut for vector eq/ne I am checking 2 tests instead. -- H.J.