diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2005-07-11 03:56:12 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2005-07-11 03:56:12 +0000 |
commit | b1b0d9aceca14ac6f15e5c0f6a78c8c77c1562b7 (patch) | |
tree | 87e06cff69f236ef94677bc1068511fb079a53b7 /gcc | |
parent | b5efa47076d28866e3be9770ea8a5788190f2d20 (diff) | |
download | gcc-b1b0d9aceca14ac6f15e5c0f6a78c8c77c1562b7.zip gcc-b1b0d9aceca14ac6f15e5c0f6a78c8c77c1562b7.tar.gz gcc-b1b0d9aceca14ac6f15e5c0f6a78c8c77c1562b7.tar.bz2 |
re PR rtl-optimization/22239 (i-cobol.adb:482: error: unrecognizable insn)
PR middle-end/22239
PR target/20126
* loop.c (loop_givs_rescan): Use expand_simple_binop instead of
gen_rtx_MINUS to handle non-replaceable (plus ((x) (const)).
From-SVN: r101863
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/loop.c | 18 |
2 files changed, 18 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 87a89f4..073b6c4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-07-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR middle-end/22239 + PR target/20126 + * loop.c (loop_givs_rescan): Use expand_simple_binop instead of + gen_rtx_MINUS to handle non-replaceable (plus ((x) (const)). + 2005-07-07 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-structalias.c (struct variable_info): Heapify complex. @@ -5496,14 +5496,18 @@ loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map) v->new_reg)); else if (GET_CODE (*v->location) == PLUS && REG_P (XEXP (*v->location, 0)) - && REG_P (v->new_reg) && CONSTANT_P (XEXP (*v->location, 1))) - loop_insn_emit_before (loop, 0, v->insn, - gen_move_insn (XEXP (*v->location, 0), - gen_rtx_MINUS - (GET_MODE (*v->location), - v->new_reg, - XEXP (*v->location, 1)))); + { + rtx tem; + start_sequence (); + tem = expand_simple_binop (GET_MODE (*v->location), MINUS, + v->new_reg, XEXP (*v->location, 1), + NULL_RTX, 0, OPTAB_LIB_WIDEN); + emit_move_insn (XEXP (*v->location, 0), tem); + tem = get_insns (); + end_sequence (); + loop_insn_emit_before (loop, 0, v->insn, tem); + } else { /* If it wasn't a reg, create a pseudo and use that. */ |