public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Uros Bizjak <uros@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8468] i386: Fix split_double_mode with paradoxical subreg [PR100626] Date: Tue, 25 May 2021 17:22:03 +0000 (GMT) [thread overview] Message-ID: <20210525172203.10D8B393A420@sourceware.org> (raw) 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); } } }
reply other threads:[~2021-05-25 17:22 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210525172203.10D8B393A420@sourceware.org \ --to=uros@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).