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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-02-14
                 CC|                            |linkw at gcc dot gnu.org,
                   |                            |meissner at gcc dot gnu.org,
                   |                            |segher at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |linkw at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Kewen Lin <linkw at gcc dot gnu.org> ---
Confirmed.

This is due to one latent bug. When specifying -Os, it doesn't try to use
SImode parity any more, but tries to use wider mode TImode parity instead, it
resulted in the wrong result.

The current vector parity (including TImode) support is wrong:

;; Vector parity
(define_insn "*p9v_parity<mode>2"
  [(set (match_operand:VParity 0 "register_operand" "=v")
        (parity:VParity (match_operand:VParity 1 "register_operand" "v")))]
  "TARGET_P9_VECTOR"
  "vprtyb<wd> %0,%1"
  [(set_attr "type" "vecsimple")])

The vprtyb[dwq] is for byte parity, it doesn't match the RTL parity semantic
directly.

Reply via email to