Commit b7a98f48 by Andreas Krebbel

S/390: Remove superfluous commutative constraint modifiers

For operands with an identical set of alternatives there is no point
in marking them commutative.  This patch removes the superfluous
constraint modifiers in vector.md and vx-builtins.md since it might
slow down reload without buying us anything.

There were even two patterns where the constraint modifier was plain
wrong: "sub<VF_HW>3" and "ior_not<VT>3". Fortunately it never had any effect.

gcc/ChangeLog:

2020-04-02  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config/s390/vector.md ("<ti*>add<mode>3", "mul<mode>3")
	("and<mode>3", "notand<mode>3", "ior<mode>3", "ior_not<mode>3")
	("xor<mode>3", "notxor<mode>3", "smin<mode>3", "smax<mode>3")
	("umin<mode>3", "umax<mode>3", "vec_widen_smult_even_<mode>")
	("vec_widen_umult_even_<mode>", "vec_widen_smult_odd_<mode>")
	("vec_widen_umult_odd_<mode>", "add<mode>3", "sub<mode>3")
	("mul<mode>3", "fma<mode>4", "fms<mode>4", "neg_fma<mode>4")
	("neg_fms<mode>4", "*smax<mode>3_vxe", "*smaxv2df3_vx")
	("*smin<mode>3_vxe", "*sminv2df3_vx"): Remove % constraint
	modifier.
	("vec_widen_umult_lo_<mode>", "vec_widen_umult_hi_<mode>")
	("vec_widen_smult_lo_<mode>", "vec_widen_smult_hi_<mode>"):
	Remove constraints from expander.
	* config/s390/vx-builtins.md ("vacc<bhfgq>_<mode>", "vacq")
	("vacccq", "vec_avg<mode>", "vec_avgu<mode>", "vec_vmal<mode>")
	("vec_vmah<mode>", "vec_vmalh<mode>", "vec_vmae<mode>")
	("vec_vmale<mode>", "vec_vmao<mode>", "vec_vmalo<mode>")
	("vec_smulh<mode>", "vec_umulh<mode>", "vec_nor<mode>3")
	("vfmin<mode>", "vfmax<mode>"): Remove % constraint modifier.
parent 2c54eab5
2020-04-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/vector.md ("<ti*>add<mode>3", "mul<mode>3")
("and<mode>3", "notand<mode>3", "ior<mode>3", "ior_not<mode>3")
("xor<mode>3", "notxor<mode>3", "smin<mode>3", "smax<mode>3")
("umin<mode>3", "umax<mode>3", "vec_widen_smult_even_<mode>")
("vec_widen_umult_even_<mode>", "vec_widen_smult_odd_<mode>")
("vec_widen_umult_odd_<mode>", "add<mode>3", "sub<mode>3")
("mul<mode>3", "fma<mode>4", "fms<mode>4", "neg_fma<mode>4")
("neg_fms<mode>4", "*smax<mode>3_vxe", "*smaxv2df3_vx")
("*smin<mode>3_vxe", "*sminv2df3_vx"): Remove % constraint
modifier.
("vec_widen_umult_lo_<mode>", "vec_widen_umult_hi_<mode>")
("vec_widen_smult_lo_<mode>", "vec_widen_smult_hi_<mode>"):
Remove constraints from expander.
* config/s390/vx-builtins.md ("vacc<bhfgq>_<mode>", "vacq")
("vacccq", "vec_avg<mode>", "vec_avgu<mode>", "vec_vmal<mode>")
("vec_vmah<mode>", "vec_vmalh<mode>", "vec_vmae<mode>")
("vec_vmale<mode>", "vec_vmao<mode>", "vec_vmalo<mode>")
("vec_smulh<mode>", "vec_umulh<mode>", "vec_nor<mode>3")
("vfmin<mode>", "vfmax<mode>"): Remove % constraint modifier.
2020-04-01 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/94123
......
......@@ -619,7 +619,7 @@
; vaccb, vacch, vaccf, vaccg, vaccq
(define_insn "vacc<bhfgq>_<mode>"
[(set (match_operand:VIT_HW 0 "register_operand" "=v")
(unspec:VIT_HW [(match_operand:VIT_HW 1 "register_operand" "%v")
(unspec:VIT_HW [(match_operand:VIT_HW 1 "register_operand" "v")
(match_operand:VIT_HW 2 "register_operand" "v")]
UNSPEC_VEC_ADDC))]
"TARGET_VX"
......@@ -630,7 +630,7 @@
(define_insn "vacq"
[(set (match_operand:TI 0 "register_operand" "=v")
(unspec:TI [(match_operand:TI 1 "register_operand" "%v")
(unspec:TI [(match_operand:TI 1 "register_operand" "v")
(match_operand:TI 2 "register_operand" "v")
(match_operand:TI 3 "register_operand" "v")]
UNSPEC_VEC_ADDE_U128))]
......@@ -643,7 +643,7 @@
(define_insn "vacccq"
[(set (match_operand:TI 0 "register_operand" "=v")
(unspec:TI [(match_operand:TI 1 "register_operand" "%v")
(unspec:TI [(match_operand:TI 1 "register_operand" "v")
(match_operand:TI 2 "register_operand" "v")
(match_operand:TI 3 "register_operand" "v")]
UNSPEC_VEC_ADDEC_U128))]
......@@ -671,7 +671,7 @@
; vavgb, vavgh, vavgf, vavgg
(define_insn "vec_avg<mode>"
[(set (match_operand:VI_HW 0 "register_operand" "=v")
(unspec:VI_HW [(match_operand:VI_HW 1 "register_operand" "%v")
(unspec:VI_HW [(match_operand:VI_HW 1 "register_operand" "v")
(match_operand:VI_HW 2 "register_operand" "v")]
UNSPEC_VEC_AVG))]
"TARGET_VX"
......@@ -683,7 +683,7 @@
; vavglb, vavglh, vavglf, vavglg
(define_insn "vec_avgu<mode>"
[(set (match_operand:VI_HW 0 "register_operand" "=v")
(unspec:VI_HW [(match_operand:VI_HW 1 "register_operand" "%v")
(unspec:VI_HW [(match_operand:VI_HW 1 "register_operand" "v")
(match_operand:VI_HW 2 "register_operand" "v")]
UNSPEC_VEC_AVGU))]
"TARGET_VX"
......@@ -855,9 +855,9 @@
; vmalb, vmalh, vmalf, vmalg
(define_insn "vec_vmal<mode>"
[(set (match_operand:VI_HW_QHS 0 "register_operand" "=v")
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "%v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:VI_HW_QHS 3 "register_operand" "v")]
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:VI_HW_QHS 3 "register_operand" "v")]
UNSPEC_VEC_VMAL))]
"TARGET_VX"
"vmal<bhfgq><w>\t%v0,%v1,%v2,%v3"
......@@ -868,9 +868,9 @@
; vmahb; vmahh, vmahf, vmahg
(define_insn "vec_vmah<mode>"
[(set (match_operand:VI_HW_QHS 0 "register_operand" "=v")
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "%v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:VI_HW_QHS 3 "register_operand" "v")]
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:VI_HW_QHS 3 "register_operand" "v")]
UNSPEC_VEC_VMAH))]
"TARGET_VX"
"vmah<bhfgq>\t%v0,%v1,%v2,%v3"
......@@ -878,10 +878,10 @@
; vmalhb; vmalhh, vmalhf, vmalhg
(define_insn "vec_vmalh<mode>"
[(set (match_operand:VI_HW_QHS 0 "register_operand" "=v")
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "%v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:VI_HW_QHS 3 "register_operand" "v")]
[(set (match_operand:VI_HW_QHS 0 "register_operand" "=v")
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:VI_HW_QHS 3 "register_operand" "v")]
UNSPEC_VEC_VMALH))]
"TARGET_VX"
"vmalh<bhfgq>\t%v0,%v1,%v2,%v3"
......@@ -891,8 +891,8 @@
; vmaeb; vmaeh, vmaef, vmaeg
(define_insn "vec_vmae<mode>"
[(set (match_operand:<vec_double> 0 "register_operand" "=v")
(unspec:<vec_double> [(match_operand:VI_HW_QHS 1 "register_operand" "%v")
[(set (match_operand:<vec_double> 0 "register_operand" "=v")
(unspec:<vec_double> [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:<vec_double> 3 "register_operand" "v")]
UNSPEC_VEC_VMAE))]
......@@ -902,9 +902,9 @@
; vmaleb; vmaleh, vmalef, vmaleg
(define_insn "vec_vmale<mode>"
[(set (match_operand:<vec_double> 0 "register_operand" "=v")
(unspec:<vec_double> [(match_operand:VI_HW_QHS 1 "register_operand" "%v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
[(set (match_operand:<vec_double> 0 "register_operand" "=v")
(unspec:<vec_double> [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:<vec_double> 3 "register_operand" "v")]
UNSPEC_VEC_VMALE))]
"TARGET_VX"
......@@ -915,9 +915,9 @@
; vmaob; vmaoh, vmaof, vmaog
(define_insn "vec_vmao<mode>"
[(set (match_operand:<vec_double> 0 "register_operand" "=v")
(unspec:<vec_double> [(match_operand:VI_HW_QHS 1 "register_operand" "%v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
[(set (match_operand:<vec_double> 0 "register_operand" "=v")
(unspec:<vec_double> [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:<vec_double> 3 "register_operand" "v")]
UNSPEC_VEC_VMAO))]
"TARGET_VX"
......@@ -926,9 +926,9 @@
; vmalob; vmaloh, vmalof, vmalog
(define_insn "vec_vmalo<mode>"
[(set (match_operand:<vec_double> 0 "register_operand" "=v")
(unspec:<vec_double> [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
[(set (match_operand:<vec_double> 0 "register_operand" "=v")
(unspec:<vec_double> [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")
(match_operand:<vec_double> 3 "register_operand" "v")]
UNSPEC_VEC_VMALO))]
"TARGET_VX"
......@@ -942,8 +942,8 @@
; vmhb, vmhh, vmhf
(define_insn "vec_smulh<mode>"
[(set (match_operand:VI_HW_QHS 0 "register_operand" "=v")
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "%v")
[(set (match_operand:VI_HW_QHS 0 "register_operand" "=v")
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")]
UNSPEC_VEC_SMULT_HI))]
"TARGET_VX"
......@@ -952,8 +952,8 @@
; vmlhb, vmlhh, vmlhf
(define_insn "vec_umulh<mode>"
[(set (match_operand:VI_HW_QHS 0 "register_operand" "=v")
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "%v")
[(set (match_operand:VI_HW_QHS 0 "register_operand" "=v")
(unspec:VI_HW_QHS [(match_operand:VI_HW_QHS 1 "register_operand" "v")
(match_operand:VI_HW_QHS 2 "register_operand" "v")]
UNSPEC_VEC_UMULT_HI))]
"TARGET_VX"
......@@ -970,9 +970,9 @@
; Vector nor
(define_insn "vec_nor<mode>3"
[(set (match_operand:VT_HW 0 "register_operand" "=v")
[(set (match_operand:VT_HW 0 "register_operand" "=v")
(not:VT_HW
(ior:VT_HW (match_operand:VT_HW 1 "register_operand" "%v")
(ior:VT_HW (match_operand:VT_HW 1 "register_operand" "v")
(match_operand:VT_HW 2 "register_operand" "v"))))]
"TARGET_VX"
"vno\t%v0,%v1,%v2"
......@@ -2120,7 +2120,7 @@
[(set (reg:CCVFHE CC_REGNUM)
(compare:CCVFHE (match_operand:VF_HW 0 "register_operand" "v")
(match_operand:VF_HW 1 "register_operand" "v")))
(set (match_operand:<tointvec> 2 "register_operand" "=v")
(set (match_operand:<tointvec> 2 "register_operand" "=v")
(ge:<tointvec> (match_dup 0) (match_dup 1)))]
"TARGET_VX"
"<vw>fche<sdx>bs\t%v2,%v0,%v1"
......@@ -2128,9 +2128,9 @@
(define_insn "vfmin<mode>"
[(set (match_operand:VF_HW 0 "register_operand" "=v")
(unspec:VF_HW [(match_operand:VF_HW 1 "register_operand" "%v")
(match_operand:VF_HW 2 "register_operand" "v")
[(set (match_operand:VF_HW 0 "register_operand" "=v")
(unspec:VF_HW [(match_operand:VF_HW 1 "register_operand" "v")
(match_operand:VF_HW 2 "register_operand" "v")
(match_operand:QI 3 "const_mask_operand" "C")]
UNSPEC_VEC_VFMIN))]
"TARGET_VXE"
......@@ -2138,9 +2138,9 @@
[(set_attr "op_type" "VRR")])
(define_insn "vfmax<mode>"
[(set (match_operand:VF_HW 0 "register_operand" "=v")
(unspec:VF_HW [(match_operand:VF_HW 1 "register_operand" "%v")
(match_operand:VF_HW 2 "register_operand" "v")
[(set (match_operand:VF_HW 0 "register_operand" "=v")
(unspec:VF_HW [(match_operand:VF_HW 1 "register_operand" "v")
(match_operand:VF_HW 2 "register_operand" "v")
(match_operand:QI 3 "const_mask_operand" "C")]
UNSPEC_VEC_VFMAX))]
"TARGET_VXE"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment