diff options
author | Alan Modra <amodra@gmail.com> | 2017-02-26 09:14:41 +1030 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2017-02-26 09:14:41 +1030 |
commit | 0a001dcba6ab07a6569031a52fb0375eaa8fe94f (patch) | |
tree | 54327ae61a01617771e4df744de94bc01f82e681 /gcc | |
parent | 888339e6484b40591bbc9728eb2c0228715889c1 (diff) | |
download | gcc-0a001dcba6ab07a6569031a52fb0375eaa8fe94f.zip gcc-0a001dcba6ab07a6569031a52fb0375eaa8fe94f.tar.gz gcc-0a001dcba6ab07a6569031a52fb0375eaa8fe94f.tar.bz2 |
PR79584, ICE in base_to_reg
PR rtl-optimization/79584
* lra-constraints.c (base_to_reg): Reload ad->base, the entire
base, not ad->base_term, the reg within base. Remove assertion
that ad->base == ad->base_term. Replace gen_int_mode using
bogus mode with const0_rtx.
From-SVN: r245741
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/lra-constraints.c | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 18410bc..fd75430 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2017-02-25 Alan Modra <amodra@gmail.com> + + PR rtl-optimization/79584 + * lra-constraints.c (base_to_reg): Reload ad->base, the entire + base, not ad->base_term, the reg within base. Remove assertion + that ad->base == ad->base_term. Replace gen_int_mode using + bogus mode with const0_rtx. + 2017-02-25 Jakub Jelinek <jakub@redhat.com> PR middle-end/79396 diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 224a956..c67bd06 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -2927,18 +2927,18 @@ base_to_reg (struct address_info *ad) rtx_insn *insn; rtx_insn *last_insn = get_last_insn(); - lra_assert (ad->base == ad->base_term && ad->disp == ad->disp_term); + lra_assert (ad->disp == ad->disp_term); cl = base_reg_class (ad->mode, ad->as, ad->base_outer_code, get_index_code (ad)); - new_reg = lra_create_new_reg (GET_MODE (*ad->base_term), NULL_RTX, + new_reg = lra_create_new_reg (GET_MODE (*ad->base), NULL_RTX, cl, "base"); new_inner = simplify_gen_binary (PLUS, GET_MODE (new_reg), new_reg, ad->disp_term == NULL - ? gen_int_mode (0, ad->mode) + ? const0_rtx : *ad->disp_term); if (!valid_address_p (ad->mode, new_inner, ad->as)) return NULL_RTX; - insn = emit_insn (gen_rtx_SET (new_reg, *ad->base_term)); + insn = emit_insn (gen_rtx_SET (new_reg, *ad->base)); code = recog_memoized (insn); if (code < 0) { |