@@ -130,6 +130,12 @@ (define_attr "predicated" "yes,no" (const_string "no"))
; encode that it is a predicable instruction.
(define_attr "mve_unpredicated_insn" "" (symbol_ref "CODE_FOR_nothing"))
+; An attribute used by the loop-doloop pass when determining whether it is
+; safe to predicate a MVE instruction, that operates across lanes, and was
+; previously not predicated. The pass will still check whether all inputs
+; are predicated by the VCTP predication mask.
+(define_attr "mve_safe_imp_xlane_pred" "yes,no" (const_string "no"))
+
; LENGTH of an instruction (in bytes)
(define_attr "length" ""
(const_int 4))
@@ -869,6 +869,14 @@ (define_code_attr mve_addsubmul [
(plus "vadd")
])
+(define_int_attr mve_vmaxmin_safe_imp [
+ (VMAXVQ_U "yes")
+ (VMAXVQ_S "no")
+ (VMAXAVQ_S "yes")
+ (VMINVQ_U "no")
+ (VMINVQ_S "no")
+ (VMINAVQ_S "no")])
+
(define_int_attr mve_cmp_op1 [
(VCMPCSQ_M_U "cs")
(VCMPEQQ_M_S "eq") (VCMPEQQ_M_U "eq")
@@ -393,6 +393,7 @@ (define_insn "@mve_<mve_insn>q_<supf><mode>"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q1"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf><mode>"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -529,6 +530,7 @@ (define_insn "@mve_<mve_insn>q_<supf>v4si"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>32\t%Q0, %R0, %q1"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf>v4si"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -802,6 +804,7 @@ (define_insn "@mve_<mve_insn>q_<supf><mode>"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q2"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf><mode>"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -1014,6 +1017,7 @@ (define_insn "@mve_<mve_insn>q_<supf><mode>"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q2"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf><mode>"))
+ (set_attr "mve_safe_imp_xlane_pred" "<mve_vmaxmin_safe_imp>")
(set_attr "type" "mve_move")
])
@@ -1033,6 +1037,7 @@ (define_insn "@mve_<mve_insn>q_<supf><mode>"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q1, %q2"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf><mode>"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -1219,6 +1224,7 @@ (define_insn "@mve_<mve_insn>q_<supf>v4si"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>32\t%Q0, %R0, %q2"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf>v4si"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -1450,6 +1456,7 @@ (define_insn "@mve_<mve_insn>q_<supf><mode>"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>%#<V_sz_elem>\t%Q0, %R0, %q1, %q2"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf><mode>"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -1588,6 +1595,7 @@ (define_insn "@mve_<mve_insn>q_<supf>v4si"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>32\t%Q0, %R0, %q1, %q2"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf>v4si"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -1725,6 +1733,7 @@ (define_insn "@mve_<mve_insn>q_<supf>v4si"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>32\t%Q0, %R0, %q2, %q3"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf>v4si"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -1742,6 +1751,7 @@ (define_insn "@mve_<mve_insn>q_<supf><mode>"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q2, %q3"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf><mode>"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -1952,6 +1962,7 @@ (define_insn "@mve_<mve_insn>q_<supf><mode>"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>%#<V_sz_elem>\t%0, %q2, %q3"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf><mode>"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])
@@ -2401,6 +2412,7 @@ (define_insn "@mve_<mve_insn>q_<supf><mode>"
"TARGET_HAVE_MVE"
"<mve_insn>.<supf>%#<V_sz_elem>\t%Q0, %R0, %q2, %q3"
[(set (attr "mve_unpredicated_insn") (symbol_ref "CODE_FOR_mve_<mve_insn>q_<supf><mode>"))
+ (set_attr "mve_safe_imp_xlane_pred" "yes")
(set_attr "type" "mve_move")
])