From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 892403858D3C; Sat, 11 Mar 2023 05:29:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 892403858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678512595; bh=/LADxmRL9z4qhLmJ4QH7s+4/9cCWYj8V43vqGo+58GM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NVfrBmHTFzcO4ukG1VasKKO1DYD89mg4JTy5YQhkQvzUjOy8oj14zcNBKNhPXHMgx AYFRAyuZsXeQSpPv2Muwgo01S4y9gRhaIMNtmkwbYnOk5OojU+rACQdBCDi8m6d9gw NI4g+RZn0XmKokOcfId1FNx6c819GEp1bWrqoEBU= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105135] [11/12/13 Regression] Optimization regression for handrolled branchless assignment since r11-4717-g3e190757fa332d32 Date: Sat, 11 Mar 2023 05:29:54 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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=3D105135 --- Comment #6 from Andrew Pinski --- If we change all char to "unsigned char", it is still different and for to_lower_3 we get on the tree level: if (_1 <=3D 25) goto ; [34.00%] else goto ; [66.00%] [local count: 365072224]: _4 =3D c_3(D) + 32; [local count: 1073741824]: # _2 =3D PHI <_4(3), c_3(D)(2)> There is another bug for the above which asks to transform this to: if (_1 <=3D 25) goto ; [34.00%] else goto ; [66.00%] [local count: 365072224]: _4 =3D 32; [local count: 1073741824]: # _t =3D PHI <_4(3), 0> _2 =3D c_3(D) + _t; Which then would get it similar to the other two ...=