From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C55073858C5F; Thu, 1 Jun 2023 01:55:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C55073858C5F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685584526; bh=qqnBuQ05S/WRpHO0zyNBjlIuEo6Xbfjx+LNXDFgmSW0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NaRfOk9VsmHkBsoi1xtBxMZ5eLzromjtP6/SIOoScDHzC4BdD7Fo8xg4evIKgceNt GP4+fL9tbo+4WyDxirz4OW/kfS1R0f7INHVyIY2XtD/6u7Vor2Y5NLyNT8jtQTo66o g3IVBbndv04jO8BFFPfXhgBQJxmZvtUfuKZJEpPY= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/110067] [14 Regression] Wrong code on pixman-0.42.2 Date: Thu, 01 Jun 2023 01:55:26 +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: needs-bisection, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com 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: 14.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=3D110067 --- Comment #4 from Hongtao.liu --- For=20 br64 =3D br; br64 =3D ((br64 << 16) & 0x000000ff00000000ull) | (br64 & 0x0000ff00ull= ); n->n is 0x3000000200. n->range is 32. n->type is uint64. Currently the code assumes n->range is same as TYPE PRECISION(n->type), and tries to rotate the mask with below code and get new mask as 0x20300 which = is incorrect.=20 tmp_n =3D tmp_n >> count | tmp_n << (range - count) --- Comment #5 from Hongtao.liu --- For=20 br64 =3D br; br64 =3D ((br64 << 16) & 0x000000ff00000000ull) | (br64 & 0x0000ff00ull= ); n->n is 0x3000000200. n->range is 32. n->type is uint64. Currently the code assumes n->range is same as TYPE PRECISION(n->type), and tries to rotate the mask with below code and get new mask as 0x20300 which = is incorrect.=20 tmp_n =3D tmp_n >> count | tmp_n << (range - count)=