From: Jakub Jelinek Date: Wed, 25 Apr 2018 13:10:01 +0000 (+0200) Subject: re PR middle-end/85414 (ICE: in ix86_expand_prologue, at config/i386/i386.c:13810... X-Git-Tag: upstream/12.2.0~32182 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b15b6fc56478c6243e5776d04c23565ebba87e68;p=platform%2Fupstream%2Fgcc.git re PR middle-end/85414 (ICE: in ix86_expand_prologue, at config/i386/i386.c:13810 with -Og -fgcse) PR middle-end/85414 * simplify-rtx.c (simplify_unary_operation_1) : Pass SUBREG_REG (op) rather than op to gen_lowpart_no_emit. From-SVN: r259649 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e65ab7b..e2f6e9c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2018-04-25 Jakub Jelinek + + PR middle-end/85414 + * simplify-rtx.c (simplify_unary_operation_1) : Pass SUBREG_REG (op) rather than op to + gen_lowpart_no_emit. + 2018-04-25 Sebastian Peryt PR target/85473 diff --git a/gcc/expr.c b/gcc/expr.c index c9e6bf2..9dd0e60 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -233,7 +233,10 @@ convert_move (rtx to, rtx from, int unsignedp) && (GET_MODE_PRECISION (subreg_promoted_mode (from)) >= GET_MODE_PRECISION (to_int_mode)) && SUBREG_CHECK_PROMOTED_SIGN (from, unsignedp)) - from = gen_lowpart (to_int_mode, from), from_mode = to_int_mode; + { + from = gen_lowpart (to_int_mode, SUBREG_REG (from)); + from_mode = to_int_mode; + } gcc_assert (GET_CODE (to) != SUBREG || !SUBREG_PROMOTED_VAR_P (to)); diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 9ce180d..e96c9d1 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1484,7 +1484,7 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op) && SUBREG_PROMOTED_SIGNED_P (op) && !paradoxical_subreg_p (mode, GET_MODE (SUBREG_REG (op)))) { - temp = rtl_hooks.gen_lowpart_no_emit (mode, op); + temp = rtl_hooks.gen_lowpart_no_emit (mode, SUBREG_REG (op)); if (temp) return temp; } @@ -1567,7 +1567,7 @@ simplify_unary_operation_1 (enum rtx_code code, machine_mode mode, rtx op) && SUBREG_PROMOTED_UNSIGNED_P (op) && !paradoxical_subreg_p (mode, GET_MODE (SUBREG_REG (op)))) { - temp = rtl_hooks.gen_lowpart_no_emit (mode, op); + temp = rtl_hooks.gen_lowpart_no_emit (mode, SUBREG_REG (op)); if (temp) return temp; }