This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mostly rewrite genrecog

Hi Richard,

I see regressions with the current IBM z13 vector patchset which appear to be related to the new

The following two insn definitions only differ in the mode and predicate of the shift count operand.

(define_insn "lshr<mode>3"
  [(set (match_operand:VI              0 "register_operand"             "=v")
        (lshiftrt:VI (match_operand:VI 1 "register_operand"              "v")
                     (match_operand:SI 2 "shift_count_or_setmem_operand" "Y")))]
  [(set_attr "op_type" "VRS")])

(define_insn "vlshr<mode>3"
  [(set (match_operand:VI              0 "register_operand" "=v")
        (lshiftrt:VI (match_operand:VI 1 "register_operand"  "v")
                     (match_operand:VI 2 "register_operand"  "v")))]
  [(set_attr "op_type" "VRR")])

However, the insn-recog.c code only seem to check the predicate. This is a problem since
shift_count_or_setmem_operand does not check the mode.

          if (shift_count_or_setmem_operand (operands[2], SImode)
#line 717 "/home3/andreas/patched/../gcc/gcc/config/s390/"
            return 600; /* lshrv2qi3 */
          if (register_operand (operands[2], V2QImode)
#line 747 "/home3/andreas/patched/../gcc/gcc/config/s390/"
            return 630; /* vlshrv2qi3 */

I could add a mode check to the predicate. However, I just wanted to check whether this change was



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]