public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-8468] i386: Fix split_double_mode with paradoxical subreg [PR100626]
@ 2021-05-25 17:22 Uros Bizjak
0 siblings, 0 replies; only message in thread
From: Uros Bizjak @ 2021-05-25 17:22 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:6be2c12e37b167890d68587086a2186358b64c02
commit r11-8468-g6be2c12e37b167890d68587086a2186358b64c02
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Tue May 18 15:45:54 2021 +0200
i386: Fix split_double_mode with paradoxical subreg [PR100626]
split_double_mode calls simplify_gen_subreg, which fails for the
high half of the paradoxical subreg. Return temporary register
instead of NULL RTX in this case.
2021-05-18 Uroš Bizjak <ubizjak@gmail.com>
gcc/
PR target/100626
* config/i386/i386-expand.c (split_double_mode): Return
temporary register when simplify_gen_subreg fails with
the high half od the paradoxical subreg.
(cherry picked from commit d39fbed75810fc7478842503ecb0268b85dc9c2e)
Diff:
---
gcc/config/i386/i386-expand.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
index dda08ff67f2..c16811013f1 100644
--- a/gcc/config/i386/i386-expand.c
+++ b/gcc/config/i386/i386-expand.c
@@ -154,9 +154,13 @@ split_double_mode (machine_mode mode, rtx operands[],
lo_half[num] = simplify_gen_subreg (half_mode, op,
GET_MODE (op) == VOIDmode
? mode : GET_MODE (op), 0);
- hi_half[num] = simplify_gen_subreg (half_mode, op,
- GET_MODE (op) == VOIDmode
- ? mode : GET_MODE (op), byte);
+
+ rtx tmp = simplify_gen_subreg (half_mode, op,
+ GET_MODE (op) == VOIDmode
+ ? mode : GET_MODE (op), byte);
+ /* simplify_gen_subreg will return NULL RTX for the
+ high half of the paradoxical subreg. */
+ hi_half[num] = tmp ? tmp : gen_reg_rtx (half_mode);
}
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-25 17:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-25 17:22 [gcc r11-8468] i386: Fix split_double_mode with paradoxical subreg [PR100626] 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).