From b3892454f7a813871f8877c48fb6ec114ce22cdb Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Thu, 6 Sep 2018 23:39:47 +0200 Subject: [PATCH] reg-stack.c (get_true_reg): Reorder to fallthru to FLOAT case. * reg-stack.c (get_true_reg) : Reorder to fallthru to FLOAT case. From-SVN: r264151 --- gcc/ChangeLog | 5 +++++ gcc/reg-stack.c | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5ab342eaa10..9657eee0800 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-09-06 Uros Bizjak + + * reg-stack.c (get_true_reg) : Reorder + to fallthru to FLOAT case. + 2018-09-06 Will Schmidt PR target/86731 diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 519ea6df75c..0f1b6d52f01 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -413,8 +413,9 @@ get_true_reg (rtx *pat) /* Eliminate FP subregister accesses in favor of the actual FP register in use. */ { - rtx subreg; - if (STACK_REG_P (subreg = SUBREG_REG (*pat))) + rtx subreg = SUBREG_REG (*pat); + + if (STACK_REG_P (subreg)) { int regno_off = subreg_regno_offset (REGNO (subreg), GET_MODE (subreg), @@ -427,6 +428,12 @@ get_true_reg (rtx *pat) pat = &XEXP (*pat, 0); break; } + + case FLOAT_TRUNCATE: + if (!flag_unsafe_math_optimizations) + return pat; + /* FALLTHRU */ + case FLOAT: case FIX: case FLOAT_EXTEND: @@ -439,12 +446,6 @@ get_true_reg (rtx *pat) pat = &XVECEXP (*pat, 0, 0); return pat; - case FLOAT_TRUNCATE: - if (!flag_unsafe_math_optimizations) - return pat; - pat = &XEXP (*pat, 0); - break; - default: return pat; } -- 2.30.2