Commit 3ea685e7 by Dominik Vogt Committed by Andreas Krebbel

S/390: Use load-on-condition in cstorecc4

gcc/ChangeLog:

2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>

	* config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
	with CCZmode for TARGET_Z196.

From-SVN: r247130
parent ba5d69f3
2017-04-25 Dominik Vogt <vogt@linux.vnet.ibm.com>
* config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
with CCZmode for TARGET_Z196.
2017-04-25 Jakub Jelinek <jakub@redhat.com> 2017-04-25 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/80501 PR rtl-optimization/80501
......
...@@ -6518,13 +6518,30 @@ ...@@ -6518,13 +6518,30 @@
[(parallel [(parallel
[(set (match_operand:SI 0 "register_operand" "") [(set (match_operand:SI 0 "register_operand" "")
(match_operator:SI 1 "s390_eqne_operator" (match_operator:SI 1 "s390_eqne_operator"
[(match_operand:CCZ1 2 "register_operand") [(match_operand 2 "cc_reg_operand")
(match_operand 3 "const0_operand")])) (match_operand 3 "const0_operand")]))
(clobber (reg:CC CC_REGNUM))])] (clobber (reg:CC CC_REGNUM))])]
"" ""
"emit_insn (gen_sne (operands[0], operands[2])); "machine_mode mode = GET_MODE (operands[2]);
if (GET_CODE (operands[1]) == EQ) if (TARGET_Z196)
emit_insn (gen_xorsi3 (operands[0], operands[0], const1_rtx)); {
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);
ite = gen_rtx_IF_THEN_ELSE (SImode, cond, const1_rtx, const0_rtx);
emit_insn (gen_rtx_SET (operands[0], ite));
}
else
{
if (mode != CCZ1mode)
FAIL;
emit_insn (gen_sne (operands[0], operands[2]));
if (GET_CODE (operands[1]) == EQ)
emit_insn (gen_xorsi3 (operands[0], operands[0], const1_rtx));
}
DONE;") DONE;")
(define_insn_and_split "sne" (define_insn_and_split "sne"
......
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