Hello Uroš,
On 12 Aug 20:16, Uros Bizjak wrote:
> In a couple of places, <MODE_SIZE> checks are changed to GET_MODE_SIZE
> (GET_MODE (operands[0])) and in a similar way, <MODE>mode checks were
> changed to GET_MODE (operands[0]). The previous checks are more
> efficient and are preferred. Is there a reason you need to check
> operands[0] dynamically?

I agree, runtime tests are worse. But this subst attributes are used
in patterns which actually do not contain mode iterators at all.
So, fix will be not only to update subst.md, but also in sse.md, in
patterns which actually employ this attribute.

E.g.
(define_expand "vec_widen_smult_even_v8si<mask_name>"
  [(set (match_operand:V4DI 0 "register_operand")
        (mult:V4DI
          (sign_extend:V4DI
            (vec_select:V4SI
              (match_operand:V8SI 1 "nonimmediate_operand")
              (parallel [(const_int 0) (const_int 2)
                         (const_int 4) (const_int 6)])))
          (sign_extend:V4DI
            (vec_select:V4SI
              (match_operand:V8SI 2 "nonimmediate_operand")
              (parallel [(const_int 0) (const_int 2)
                         (const_int 4) (const_int 6)])))))]
  "TARGET_AVX2 && <mask_mode512bit_condition>"

Will be replaced with:
(define_expand "vec_widen_smult_even_v8si<mask_name>"
  [(set (match_operand:V4DI 0 "register_operand")
        (mult:V4DI
          (sign_extend:V4DI
            (vec_select:V4SI
              (match_operand:V8SI 1 "nonimmediate_operand")
              (parallel [(const_int 0) (const_int 2)
                         (const_int 4) (const_int 6)])))
          (sign_extend:V4DI
            (vec_select:V4SI
              (match_operand:V8SI 2 "nonimmediate_operand")
              (parallel [(const_int 0) (const_int 2)
                         (const_int 4) (const_int 6)])))))]
  "TARGET_AVX2 && (!<mask_applied> || TARGET_AVX512VL)"

I am working on patch.

--
Thanks, K

Reply via email to