* [PATCH] Beautify reg_stack.c/get_true_reg a tiny bit
@ 2018-09-06 21:42 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2018-09-06 21:42 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 241 bytes --]
2018-09-06 Uros Bizjak <ubizjak@gmail.com>
* reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
to fallthru to FLOAT case.
Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
Committed to mainline SVN.
Uros.
[-- Attachment #2: p.diff.txt --]
[-- Type: text/plain, Size: 1005 bytes --]
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-09-06 21:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-06 21:42 [PATCH] Beautify reg_stack.c/get_true_reg a tiny bit Uros Bizjak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).