From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 93AC33858407; Mon, 29 Jan 2024 09:07:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 93AC33858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706519270; bh=o8iuo/avoL88VXHgrIlMusOUARdEv7yxinHiCOBpuHc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=obj9QHWsnyiuKGw9PBhm9X7DOwAJkcYa2lEDqf+zzHlShWJR4WFT71pECl8b3UMiu iaCFumqwP5laud9BQRziF2Lo4doktnwiXJg3vzHvZZPx7uGLcCSB3BvoT5sij39Qap MJe7fOAc1BCsm+1irLLtYR2FrvFyom/tKK6yIlac= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/113622] [11/12/13/14 Regression] ICE with vectors in named registers Date: Mon, 29 Jan 2024 09:07:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, testsuite-fail X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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=3D113622 --- Comment #13 from Jakub Jelinek --- (In reply to Xi Ruoyao from comment #12) > (In reply to Jakub Jelinek from comment #11) > > I think it is most important we don't ICE and generate correct code. I > > doubt this is used too much in real-world code, otherwise it would have= been > > reported years ago, so how efficient it will be is less important. >=20 > Hmm, but for another test case (LoongArch): >=20 > typedef double __attribute__ ((vector_size (32))) vec; > register vec a asm("f25"), b asm("f26"), c asm("f27"); >=20 > void > test (void) > { > for (int i =3D 0; i < 4; i++) > c[i] =3D __builtin_isless (a[i], b[i]) ? 0.1 : 0.2; > } >=20 > I'll have to write a loop (because __builtin_isless does not work on > vectors). Or is there a vector built-in I'm missing? Why are you doing that? Normally tests would do vec test (vec a, vec b) { vec c =3D {}; for (int i =3D 0; i < 4; i++) c[i] =3D __builtin_isless (a[i], b[i]) ? 0.1 : 0.2; return c; } or something similar.=