public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marxin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106919] [13 Regression] RTL check: expected code 'set' or 'clobber', have 'if_then_else' in s390_rtx_costs, at config/s390/s390.cc:3672on s390x-linux-gnu since r13-2251-g1930c5d05ceff2 Date: Thu, 22 Sep 2022 20:12:04 +0000 [thread overview] Message-ID: <bug-106919-4-05U0ikCxYR@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106919-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106919 --- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> --- Fixed with: diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc index 076c97a8b22..869847ab3d7 100644 --- a/gcc/config/s390/s390.cc +++ b/gcc/config/s390/s390.cc @@ -3669,7 +3669,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code, slightly more expensive than a normal load. */ *total = COSTS_N_INSNS (1) + 2; - rtx dst = SET_DEST (src); + rtx dst = dest; rtx then = XEXP (src, 1); rtx els = XEXP (src, 2); But I think the declaration of 'dest' should be removed: diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc index 076c97a8b22..fa571c0190a 100644 --- a/gcc/config/s390/s390.cc +++ b/gcc/config/s390/s390.cc @@ -3648,7 +3648,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code, *total = 0; return true; case SET: { - rtx dest = SET_DEST (x); + rtx dst = SET_DEST (x); rtx src = SET_SRC (x); switch (GET_CODE (src)) @@ -3669,7 +3669,6 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code, slightly more expensive than a normal load. */ *total = COSTS_N_INSNS (1) + 2; - rtx dst = SET_DEST (src); rtx then = XEXP (src, 1); rtx els = XEXP (src, 2); @@ -3696,25 +3695,25 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code, break; } - switch (GET_CODE (dest)) + switch (GET_CODE (dst)) { case SUBREG: - if (!REG_P (SUBREG_REG (dest))) + if (!REG_P (SUBREG_REG (dst))) *total += rtx_cost (SUBREG_REG (src), VOIDmode, SET, 0, speed); /* fallthrough */ case REG: /* If this is a VR -> VR copy, count the number of registers. */ - if (VECTOR_MODE_P (GET_MODE (dest)) && REG_P (src)) + if (VECTOR_MODE_P (GET_MODE (dst)) && REG_P (src)) { - int nregs = s390_hard_regno_nregs (VR0_REGNUM, GET_MODE (dest)); + int nregs = s390_hard_regno_nregs (VR0_REGNUM, GET_MODE (dst)); *total = COSTS_N_INSNS (nregs); } /* Same for GPRs. */ else if (REG_P (src)) { int nregs - = s390_hard_regno_nregs (GPR0_REGNUM, GET_MODE (dest)); + = s390_hard_regno_nregs (GPR0_REGNUM, GET_MODE (dst)); *total = COSTS_N_INSNS (nregs); } else @@ -3722,7 +3721,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_code, *total += rtx_cost (src, mode, SET, 1, speed); return true; case MEM: { - rtx address = XEXP (dest, 0); + rtx address = XEXP (dst, 0); rtx tmp; long tmp2; if (s390_loadrelative_operand_p (address, &tmp, &tmp2)) @Robin: What do you think?
next prev parent reply other threads:[~2022-09-22 20:12 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-12 23:32 [Bug target/106919] New: [13 Regression] RTL check: expected code 'set' or 'clobber', have 'if_then_else' in s390_rtx_costs, at config/s390/s390.cc:3672on s390x-linux-gnu doko at gcc dot gnu.org 2022-09-13 6:49 ` [Bug target/106919] " rguenth at gcc dot gnu.org 2022-09-13 11:27 ` marxin at gcc dot gnu.org 2022-09-22 9:47 ` doko at gcc dot gnu.org 2022-09-22 9:48 ` doko at gcc dot gnu.org 2022-09-22 9:50 ` doko at gcc dot gnu.org 2022-09-22 19:35 ` marxin at gcc dot gnu.org 2022-09-22 20:07 ` [Bug target/106919] [13 Regression] RTL check: expected code 'set' or 'clobber', have 'if_then_else' in s390_rtx_costs, at config/s390/s390.cc:3672on s390x-linux-gnu since r13-2251-g1930c5d05ceff2 marxin at gcc dot gnu.org 2022-09-22 20:12 ` marxin at gcc dot gnu.org [this message] 2022-09-23 8:44 ` rdapp at gcc dot gnu.org 2022-09-26 10:09 ` marxin at gcc dot gnu.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-106919-4-05U0ikCxYR@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).