I wrote (incorrectly):

> >    [(parallel
> >      [(set (match_operand:SI 0 "register_operand" "")
> >       (match_operator:SI 1 "s390_eqne_operator"
> > -           [(match_operand:CCZ1 2 "register_operand")
> > +           [(match_operand 2 "cc_reg_operand")
> >         (match_operand 3 "const0_operand")]))
> >       (clobber (reg:CC CC_REGNUM))])]
> >    ""
> > -  "emit_insn (gen_sne (operands[0], operands[2]));
> > -   if (GET_CODE (operands[1]) == EQ)
> > -     emit_insn (gen_xorsi3 (operands[0], operands[0], const1_rtx));
> > +  "machine_mode mode = GET_MODE (operands[2]);
> > +   if (TARGET_Z196)
> > +     {
> > +       rtx cond, ite;
> > +
> > +       if (GET_CODE (operands[1]) == NE)
> > +    cond = gen_rtx_NE (VOIDmode, operands[2], const0_rtx);
> > +       else
> > +    cond = gen_rtx_EQ (VOIDmode, operands[2], const0_rtx);
> 
> I guess as a result cond is now always the same as operands[1] and
> could be just taken from there?

This is wrong -- I didn't notice the mode changes (in the cstore
pattern, the mode on the operator is SImode, but of the if_then_else
we want VOIDmode.

> > +       ite = gen_rtx_IF_THEN_ELSE (SImode, cond, const1_rtx, const0_rtx);
> > +       emit_insn (gen_rtx_SET (operands[0], ite));
> 
> Also, since you're just emitting RTL directly, maybe you could simply use
> the expander pattern above to do so (and not use emit_insn followed
> by DONE in this case?)

Therefore this doesn't work either.

Sorry for the confusion.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU/Linux compilers and toolchain
  ulrich.weig...@de.ibm.com

Reply via email to