diff options
author | Jan Hubicka <jh@suse.cz> | 2003-01-10 22:28:24 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2003-01-10 21:28:24 +0000 |
commit | 5f1355ef3890b4a997155b4f143681a1f992f68a (patch) | |
tree | 65a4f02cdf64046c0d61de2ad4b69a61ac81be83 /gcc/ifcvt.c | |
parent | 6787cc15f20c6b0b464de402982702ac13de23fc (diff) | |
download | gcc-5f1355ef3890b4a997155b4f143681a1f992f68a.zip gcc-5f1355ef3890b4a997155b4f143681a1f992f68a.tar.gz gcc-5f1355ef3890b4a997155b4f143681a1f992f68a.tar.bz2 |
ifcvt.c (noce_try_addcc): Do not call emit_conditional_add with weird operands.
Fri Jan 10 22:05:35 CET 2003 Jan Hubicka <jh@suse.cz>
* ifcvt.c (noce_try_addcc): Do not call emit_conditional_add
with weird operands.
From-SVN: r61169
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 3cf0194..21a7e64 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -882,26 +882,30 @@ noce_try_addcc (if_info) enum rtx_code code = reversed_comparison_code (cond, if_info->jump); /* First try to use addcc pattern. */ - start_sequence (); - target = emit_conditional_add (if_info->x, code, - XEXP (cond, 0), XEXP (cond, 1), - VOIDmode, - if_info->b, XEXP (if_info->a, 1), - GET_MODE (if_info->x), - (code == LTU || code == GEU - || code == LEU || code == GTU)); - if (target) + if (general_operand (XEXP (cond, 0), VOIDmode) + && general_operand (XEXP (cond, 1), VOIDmode)) { - if (target != if_info->x) - noce_emit_move_insn (if_info->x, target); + start_sequence (); + target = emit_conditional_add (if_info->x, code, + XEXP (cond, 0), XEXP (cond, 1), + VOIDmode, + if_info->b, XEXP (if_info->a, 1), + GET_MODE (if_info->x), + (code == LTU || code == GEU + || code == LEU || code == GTU)); + if (target) + { + if (target != if_info->x) + noce_emit_move_insn (if_info->x, target); - seq = get_insns (); + seq = get_insns (); + end_sequence (); + emit_insn_before_scope (seq, if_info->jump, + INSN_SCOPE (if_info->insn_a)); + return TRUE; + } end_sequence (); - emit_insn_before_scope (seq, if_info->jump, - INSN_SCOPE (if_info->insn_a)); - return TRUE; } - end_sequence (); /* If that fails, construct conditional increment or decrement using setcc. */ |