From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1851) id 99913385781C; Mon, 13 Sep 2021 13:26:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 99913385781C Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Martin Liska To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/marxin/heads/loop-unswitching-switch-v3)] Revert "Revert "Get rid of all float-int special cases in validate_subreg."" X-Act-Checkin: gcc X-Git-Author: Martin Liska X-Git-Refname: refs/users/marxin/heads/loop-unswitching-switch-v3 X-Git-Oldrev: 5f6a6c91d7c592cb49f7c519f289777eac09bb74 X-Git-Newrev: 2a171a5cace95acb085953f153da5b1be9a673aa Message-Id: <20210913132643.99913385781C@sourceware.org> Date: Mon, 13 Sep 2021 13:26:43 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2021 13:26:43 -0000 https://gcc.gnu.org/g:2a171a5cace95acb085953f153da5b1be9a673aa commit 2a171a5cace95acb085953f153da5b1be9a673aa Author: Martin Liska Date: Mon Sep 13 14:59:19 2021 +0200 Revert "Revert "Get rid of all float-int special cases in validate_subreg."" This reverts commit 57b7c432cce893e1ba60d9b94a9606df6b419379. Diff: --- gcc/emit-rtl.c | 40 ---------------------------------------- 1 file changed, 40 deletions(-) diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index e6158f243c0..0ba110879aa 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -922,46 +922,6 @@ validate_subreg (machine_mode omode, machine_mode imode, poly_uint64 regsize = REGMODE_NATURAL_SIZE (imode); - /* ??? This should not be here. Temporarily continue to allow word_mode - subregs of anything. The most common offender is (subreg:SI (reg:DF)). - Generally, backends are doing something sketchy but it'll take time to - fix them all. */ - if (omode == word_mode) - ; - /* ??? Similarly, e.g. with (subreg:DF (reg:TI)). Though store_bit_field - is the culprit here, and not the backends. */ - else if (known_ge (osize, regsize) && known_ge (isize, osize)) - ; - /* Allow component subregs of complex and vector. Though given the below - extraction rules, it's not always clear what that means. */ - else if ((COMPLEX_MODE_P (imode) || VECTOR_MODE_P (imode)) - && GET_MODE_INNER (imode) == omode) - ; - /* ??? x86 sse code makes heavy use of *paradoxical* vector subregs, - i.e. (subreg:V4SF (reg:SF) 0) or (subreg:V4SF (reg:V2SF) 0). This - surely isn't the cleanest way to represent this. It's questionable - if this ought to be represented at all -- why can't this all be hidden - in post-reload splitters that make arbitrarily mode changes to the - registers themselves. */ - else if (VECTOR_MODE_P (omode) - && GET_MODE_INNER (omode) == GET_MODE_INNER (imode)) - ; - /* Subregs involving floating point modes are not allowed to - change size. Therefore (subreg:DI (reg:DF) 0) is fine, but - (subreg:SI (reg:DF) 0) isn't. */ - else if (FLOAT_MODE_P (imode) || FLOAT_MODE_P (omode)) - { - if (! (known_eq (isize, osize) - /* LRA can use subreg to store a floating point value in - an integer mode. Although the floating point and the - integer modes need the same number of hard registers, - the size of floating point mode can be less than the - integer mode. LRA also uses subregs for a register - should be used in different mode in on insn. */ - || lra_in_progress)) - return false; - } - /* Paradoxical subregs must have offset zero. */ if (maybe_gt (osize, isize)) return known_eq (offset, 0U);