From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8EF893857C4F; Tue, 11 Aug 2020 07:59:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EF893857C4F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1597132766; bh=T8DDWmQmIBnrPVUbCyPmvscc4uxvHz2U2+kzqk/tBoM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=GfDg1GEysxH6EgCSGvYsdOao4GP5riNnVt7R3ciiMuz21dRxTcNLb59a4V0DP8DPd Y9NjUEsqp+kNIg+1bbhk+nPvLxApNhePzgMxPtnJy3iH0VD3cKVXbTUt6FdWYIJE1k VHx6xY8gSwEQ7633VqmgC4eVaysZ0h0X2c92iHbE= From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/96482] [10/11 Regression] Combination of -finline-small-functions and ipa-cp optimisations causes incorrect values being passed to a function since r279523 Date: Tue, 11 Aug 2020 07:59:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: marxin at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.3 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Aug 2020 07:59:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96482 --- Comment #9 from Martin Li=C5=A1ka --- Also this one shows the problem: -fdbg-cnt=3Dipa_cp_bits:10460-10461. If I see correctly the function body: lto-dump -dump-body=3Daddr_to_index nir_lower_io.c.o Gimple Body of Function: addr_to_index addr_to_index (struct nir_builder * b, struct nir_ssa_def * addr, nir_address_format addr_format) { unsigned int c; [local count: 1073741824]: if (addr_format_3(D) =3D=3D 3) goto ; [20.24%] else goto ; [79.76%] [local count: 217325344]: c =3D 0; _9 =3D nir_swizzle (b_5(D), addr_6(D), &c, 1); c =3D{v} {CLOBBER}; goto ; [100.00%] [local count: 856416481]: if (addr_format_3(D) =3D=3D 4) goto ; [100.00%] else goto ; [0.00%] [local count: 856416481]: _8 =3D nir_channels (b_5(D), addr_6(D), 3); goto ; [100.00%] [count: 0]: __builtin_unreachable (); [local count: 1073741824]: # _1 =3D PHI <_9(3), _8(5)> return _1; } addr_format (aka param 2) is either 3 or 4. 3 =3D 0x011 4 =3D 0x100 so mask 6 =3D 0x110 is wrong as first bit is not constant. @Martin: Am I right?=