From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8BC0C393BC2A; Tue, 13 Apr 2021 07:42:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8BC0C393BC2A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99648] [11 regression] gcc.dg/torture/pr71522.c fails starting with r11-165 for 32 bits Date: Tue, 13 Apr 2021 07:42:07 +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: 11.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 11.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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2021 07:42:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99648 --- Comment #13 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:c0f772894b6b3cd8ed5c5dd09d0c7917f51cf70f commit r11-8146-gc0f772894b6b3cd8ed5c5dd09d0c7917f51cf70f Author: Jakub Jelinek Date: Tue Apr 13 09:41:20 2021 +0200 simplify-rtx: Punt on simplify_{,gen_}subreg to IBM double double if bi= ts are lost [PR99648] Similarly to PR95450 done on GIMPLE, this patch punts if we try to simplify_{gen_,}subreg from some constant into the IBM double double IFmode (or sometimes TFmode) if the double double format wouldn't prese= rve the bits. Not all values are valid in IBM double double, e.g. the form= at requires that the upper double is the whole value rounded to double, and if in some cases such as in the pr71522.c testcase with -m32 -Os -mcpu=3Dpower7 some non-floating data is copied through long double variable, we can simplify a subreg into something that has different value. Fixed by punting if the planned simplify_immed_subreg result doesn't encode to bitwise identical values compared to what we were decoding. As for the simplify_gen_subreg change, I think it would be desirable to just avoid creating SUBREGs of constants on all targets and for all constants, if simplify_immed_subreg simplified, fine, otherwise punt, but as we are late in GCC11 development, the patch instead guards this behavior on MODE_COMPOSITE_P (outermode) - i.e. only conversions to powerpc{,64,64le} double double long double - and only for the cases wh= ere simplify_immed_subreg was called. 2021-04-13 Jakub Jelinek PR target/99648 * simplify-rtx.c (simplify_immed_subreg): For MODE_COMPOSITE_P outermode, return NULL if the result doesn't encode back to the original byte sequence. (simplify_gen_subreg): Don't create SUBREGs from constants to MODE_COMPOSITE_P outermode.=