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

--- Comment #2 from Michael Meissner <meissner at gcc dot gnu.org> ---
Yes, bcdadd requires all of its arguments to be altivec registers.

However, the pattern below is wrong:

(define_insn "bcd<bcd_add_sub>"
  [(set (match_operand:V1TI 0 "register_operand" "")
        (unspec:V1TI [(match_operand:V1TI 1 "register_operand" "")
                      (match_operand:V1TI 2 "register_operand" "")
                      (match_operand:QI 3 "const_0_to_1_operand" "")]
                     UNSPEC_BCD_ADD_SUB))
   (clobber (reg:CCFP CR6_REGNO))]
  "TARGET_P8_VECTOR"
  "bcd<bcd_add_sub>. %0,%1,%2,%3"
  [(set_attr "length" "4")
   (set_attr "type" "vecsimple")])

It should have "v" constraints for each of the registers, and "n" for the
integer.  It probably should use altivec_register_operand (or at least
gpc_reg_operand) instead of register_operand as well.

Reply via email to