From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2AC803858C2B; Thu, 31 Aug 2023 06:49:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AC803858C2B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693464572; bh=7yQhnE5gM3NLs8kqMf90ju59sZqsyaOQssTR5ARFGjo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E5iPv+9JmlN4C99pM0S05nBiOY232RDcDpWKOAhIoylTs359Dmv0cv8/XGvelM6UQ Q2nUKU53T3dk1U6Du/sez/CjPEu2AIgCxSUqDuwfoG9uwf2J4MT0vtFs0V0GLUzfhK Lyn8Fm91A+gsrY0gz1LyXLe6MJMl86OCahxu10qo= From: "malat at debian dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111231] armhf: Miscompilation at O2 level (O1 is working) Date: Thu, 31 Aug 2023 06:49:31 +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.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: malat at debian dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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=3D111231 --- Comment #4 from Mathieu Malaterre --- Intermediate result (creduce Debian/sid): #include "hwy/tests/test_util-inl.h" namespace hwy { namespace HWY_NAMESPACE { struct a { template void operator()(b, c d) { using e =3D MakeUnsigned; using f =3D MakeWide; RepartitionToWide aa; using g =3D Vec; using h =3D Vec; size_t z =3D Lanes(d); size_t j =3D Lanes(aa); RebindToUnsigned k; g l; h m; auto ab =3D AllocateAligned(j), af =3D AllocateAligned(z), u =3D AllocateAligned(z); for (size_t n; 0;) { b ac =3D b(n); e o =3D e(ac); ab[0] =3D o; } auto ad =3D Set(d, LimitsMin()), p =3D Set(d, LimitsMax()), q =3D Set(k, LimitsMax()), r =3D Set(aa, LimitsMin()), s =3D Set(aa, LimitsMax()); b t, ae(0); for (size_t i =3D 0; i < z; i++) { auto ag(t), v(0 ? ag : ae), ah(v + 20); af[i] =3D u[i] =3D b(-ah); } auto w =3D Load(d, af.get()); HWY_ASSERT_VEC_EQ(aa, s, SatWidenMulPairwiseAdd(aa, q, p)); auto x =3D Load(d, u.get()); HWY_ASSERT_VEC_EQ( aa, r, SatWidenMulPairwiseAdd(aa, BitCast(k, w), InterleaveLower(x, ad))); } }; void y() { ForShrinkableVectors()(int8_t()); } } // namespace HWY_NAMESPACE } // namespace hwy int main() { hwy::N_EMU128::y(); }=