public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/94541] [8/9/10 Regression] -mx32 gcc produces wrong code passing structs by value Date: Thu, 09 Apr 2020 21:04:59 +0000 [thread overview] Message-ID: <bug-94541-4-OrNBmhhjgM@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94541-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94541 --- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> --- I am testing this: diff --git a/gcc/lra-spills.c b/gcc/lra-spills.c index 0caa4acd3b5..bd4ee80245d 100644 --- a/gcc/lra-spills.c +++ b/gcc/lra-spills.c @@ -844,9 +844,14 @@ lra_final_code_change (void) struct lra_static_insn_data *static_id = id->insn_static_data; bool insn_change_p = false; + set = single_set (insn); + /* NB: Never change SUBREG in the source operand of a SET + insn to REG. */ for (i = id->insn_static_data->n_operands - 1; i >= 0; i--) if ((DEBUG_INSN_P (insn) || ! static_id->operand[i].is_operator) + && (set == NULL + || !rtx_equal_p (SET_SRC (set), *id->operand_loc[i])) && alter_subregs (id->operand_loc[i], ! DEBUG_INSN_P (insn))) { lra_update_dup (id, i); @@ -855,7 +860,7 @@ lra_final_code_change (void) if (insn_change_p) lra_update_operator_dups (id); - if ((set = single_set (insn)) != NULL + if (set != NULL && REG_P (SET_SRC (set)) && REG_P (SET_DEST (set)) && REGNO (SET_SRC (set)) == REGNO (SET_DEST (set))) {
next prev parent reply other threads:[~2020-04-09 21:04 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-09 13:48 [Bug target/94541] New: " ibuclaw at gdcproject dot org 2020-04-09 13:55 ` [Bug target/94541] " ibuclaw at gdcproject dot org 2020-04-09 14:40 ` jakub at gcc dot gnu.org 2020-04-09 15:29 ` [Bug target/94541] [8/9/10 Regression] " hjl.tools at gmail dot com 2020-04-09 16:57 ` ibuclaw at gdcproject dot org 2020-04-09 16:59 ` ibuclaw at gdcproject dot org 2020-04-09 20:31 ` hjl.tools at gmail dot com 2020-04-09 20:32 ` hjl.tools at gmail dot com 2020-04-09 20:42 ` [Bug middle-end/94541] " hjl.tools at gmail dot com 2020-04-09 20:53 ` pinskia at gcc dot gnu.org 2020-04-09 21:04 ` hjl.tools at gmail dot com [this message] 2020-04-09 21:07 ` hjl.tools at gmail dot com 2020-04-09 21:32 ` pinskia at gcc dot gnu.org 2020-04-09 22:28 ` hjl.tools at gmail dot com 2020-04-09 22:32 ` [Bug target/94541] " pinskia at gcc dot gnu.org 2020-04-09 23:24 ` hjl.tools at gmail dot com 2020-04-09 23:28 ` hjl.tools at gmail dot com 2020-04-10 10:57 ` hjl.tools at gmail dot com 2020-04-10 11:20 ` ibuclaw at gdcproject dot org
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=bug-94541-4-OrNBmhhjgM@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).