On 12.11.20 13:21, Stefan Schulze Frielinghaus wrote: > Bootstrapped and regtested on IBM Z. Ok for master? > > gcc/ChangeLog: > > * config/s390/vector.md ("vec_vfees<mode>"): New insn pattern. > --- > gcc/config/s390/vector.md | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md > index 31d323930b2..4333a2191ae 100644 > --- a/gcc/config/s390/vector.md > +++ b/gcc/config/s390/vector.md > @@ -1798,6 +1798,32 @@ > "vll\t%v0,%1,%2" > [(set_attr "op_type" "VRS")]) > > +; vfeebs, vfeehs, vfeefs > +; vfeezbs, vfeezhs, vfeezfs > +(define_insn "vec_vfees<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:QI 3 "const_mask_operand" "C")] > + UNSPEC_VEC_VFEE)) > + (set (reg:CCRAW CC_REGNUM) > + (unspec:CCRAW [(match_dup 1) > + (match_dup 2) > + (match_dup 3)] > + UNSPEC_VEC_VFEECC))] > + "TARGET_VX" > +{ > + unsigned HOST_WIDE_INT flags = UINTVAL (operands[3]); > + > + gcc_assert (!(flags & ~(VSTRING_FLAG_ZS | VSTRING_FLAG_CS))); > + flags &= ~VSTRING_FLAG_CS; > + > + if (flags == VSTRING_FLAG_ZS) > + return "vfeez<bhfgq>s\t%v0,%v1,%v2"; > + return "vfee<bhfgq>s\t%v0,%v1,%v2"; > +} > + [(set_attr "op_type" "VRR")]) > + > ; vfenebs, vfenehs, vfenefs > ; vfenezbs, vfenezhs, vfenezfs > (define_insn "vec_vfenes<mode>" >
Since this is mostly a copy of the pattern in vx-builtins.md I think we should remove the other version then. I also would prefer this to be committed together with the code making use of the expander. So far this would be dead code - right? Andreas