From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5B57F3858400; Thu, 22 Sep 2022 20:12:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B57F3858400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663877525; bh=SdKl9H4pEr6HUzy45UkwvJ52y6dSI6L2JHtURaIMl/w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IkAAUnpW2vehp3NbRJnbGNZN1y1ZqEpBNnSAwBwfff2yifTof7vci+cqZlHamlh7n 5E5geZPSGVJ2v5sjsrhjHLqkPXc7XPS8SAcee4bG/Oo0QguezJt/PkhlLXD/t9vc/L +RjVLND7f9R+XUnLeR5/BEXQ6VligSE1AUdrZAXQ= From: "marxin at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106919 --- Comment #7 from Martin Li=C5=A1ka --- 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_c= ode, slightly more expensive than a normal load. */ *total =3D COSTS_N_INSNS (1) + 2; - rtx dst =3D SET_DEST (src); + rtx dst =3D dest; rtx then =3D XEXP (src, 1); rtx els =3D 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_c= ode, *total =3D 0; return true; case SET: { - rtx dest =3D SET_DEST (x); + rtx dst =3D SET_DEST (x); rtx src =3D SET_SRC (x); switch (GET_CODE (src)) @@ -3669,7 +3669,6 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_c= ode, slightly more expensive than a normal load. */ *total =3D COSTS_N_INSNS (1) + 2; - rtx dst =3D SET_DEST (src); rtx then =3D XEXP (src, 1); rtx els =3D 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 +=3D rtx_cost (SUBREG_REG (src), VOIDmode, SET, 0, spe= ed); /* 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 =3D s390_hard_regno_nregs (VR0_REGNUM, GET_MODE (dest)); + int nregs =3D s390_hard_regno_nregs (VR0_REGNUM, GET_MODE (= dst)); *total =3D COSTS_N_INSNS (nregs); } /* Same for GPRs. */ else if (REG_P (src)) { int nregs - =3D s390_hard_regno_nregs (GPR0_REGNUM, GET_MODE (dest)); + =3D s390_hard_regno_nregs (GPR0_REGNUM, GET_MODE (dst)); *total =3D COSTS_N_INSNS (nregs); } else @@ -3722,7 +3721,7 @@ s390_rtx_costs (rtx x, machine_mode mode, int outer_c= ode, *total +=3D rtx_cost (src, mode, SET, 1, speed); return true; case MEM: { - rtx address =3D XEXP (dest, 0); + rtx address =3D XEXP (dst, 0); rtx tmp; long tmp2; if (s390_loadrelative_operand_p (address, &tmp, &tmp2)) @Robin: What do you think?=