From ca18edc55f1c23fcaa06aabe07460f4bb56f937f Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Tue, 10 Apr 2012 13:50:43 +0000 Subject: [PATCH] fwprop.c (propagate_rtx): Also set PR_CAN_APPEAR for subregs. * fwprop.c (propagate_rtx): Also set PR_CAN_APPEAR for subregs. Co-Authored-By: Richard Sandiford From-SVN: r186278 --- gcc/ChangeLog | 5 +++++ gcc/fwprop.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b92e94..bd7a2c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-04-10 Ulrich Weigand + Richard Sandiford + + * fwprop.c (propagate_rtx): Also set PR_CAN_APPEAR for subregs. + 2012-04-10 Richard Guenther PR middle-end/52888 diff --git a/gcc/fwprop.c b/gcc/fwprop.c index 4fab5b0..c353037 100644 --- a/gcc/fwprop.c +++ b/gcc/fwprop.c @@ -664,7 +664,12 @@ propagate_rtx (rtx x, enum machine_mode mode, rtx old_rtx, rtx new_rtx, return NULL_RTX; flags = 0; - if (REG_P (new_rtx) || CONSTANT_P (new_rtx)) + if (REG_P (new_rtx) + || CONSTANT_P (new_rtx) + || (GET_CODE (new_rtx) == SUBREG + && REG_P (SUBREG_REG (new_rtx)) + && (GET_MODE_SIZE (mode) + <= GET_MODE_SIZE (GET_MODE (SUBREG_REG (new_rtx)))))) flags |= PR_CAN_APPEAR; if (!for_each_rtx (&new_rtx, varying_mem_p, NULL)) flags |= PR_HANDLE_MEM; -- 2.7.4