From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B87BE385840C; Wed, 17 Nov 2021 19:36:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B87BE385840C From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/103246] [12 Regression] 416.gamess miscompare with -O2 -g -flto=auto since r12-5223-gecdf414bd89e6ba251f6b3f494407139b4dbae0e Date: Wed, 17 Nov 2021 19:36:38 +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: 12.0 X-Bugzilla-Keywords: lto, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 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: Wed, 17 Nov 2021 19:36:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103246 --- Comment #20 from Jan Hubicka --- linking with --dbg-cnt=3Dipa_cp_values:10 -flto-partition=3Done --disable-tree-modref2 --dbg-cnt=3Dipa_mod_ref:836 -fdump-tree-all-details -fdump-ipa-all-details is first that produces different results. Diff to 835 is: diff -u 835/gamess.ltrans0.ltrans.113t.dse2 836/gamess.ltrans0.ltrans.113t.= dse2 --- 835/gamess.ltrans0.ltrans.113t.dse2 2021-11-17 20:11:34.894715053 +0100 +++ 836/gamess.ltrans0.ltrans.113t.dse2 2021-11-17 20:12:40.387968675 +0100 @@ -14780,7 +14780,6 @@ ipa-modref: call to dco.isra/287 does not use ref: kz alias sets: 4->4 ipa-modref: call stmt dc_1560 =3D dco.isra (l_1973, m_1975, &kx, &ky, &kz, la_1974, mu_1976, _513, _510, _507, _504, _501, _498); ipa-modref: call to dco.isra/287 does not use ref: jndx alias sets: 4->4 -***dbgcnt: upper limit 835 reached for ipa_mod_ref.*** ipa-modref: call stmt dc_1560 =3D dco.isra (l_1973, m_1975, &kx, &ky, &kz, la_1974, mu_1976, _513, _510, _507, _504, _501, _498); ipa-modref: call to dco.isra/287 does not use ref: kz alias sets: 4->4 Deleted trivially dead stmt: _1548 =3D (long int) _1547; @@ -14799,6 +14798,13 @@ Deleted trivially dead stmt: _1770 =3D indx_1668 + 1; +***dbgcnt: upper limit 836 reached for ipa_mod_ref.*** +ipa-modref: call stmt dc_1710 =3D dco.isra (0, 0, &D.8524, &D.8523, &D.852= 2, la_1977, mu_1978, _513, _510, _507, _504, _501, _498); +ipa-modref: call to dco.isra/287 does not use ref: D.8522 alias sets: 4->4 + Deleted dead store: D.8522 =3D _1709; + + Deleted trivially dead stmt: _1709 =3D kz_1696 + kzp_1699; + At WPA time we first compute summary for original function and then update = for new signature: Updating summary for dco.isra/287 from: loads: Limits: 32 bases, 16 refs Base 0:int (alias set 4) Ref 0:int (alias set 4) access: Parm 0 param offset:0 offset:0 size:32 max_size:32 access: Parm 1 param offset:0 offset:0 size:32 max_size:32 access: Parm 5 param offset:0 offset:0 size:32 max_size:32 access: Parm 6 param offset:0 offset:0 size:32 max_size:32 access: Parm 2 param offset:0 offset:0 size:32 max_size:32 access: Parm 3 param offset:0 offset:0 size:32 max_size:32 access: Parm 4 param offset:0 offset:0 size:32 max_size:32 Base 1:int[0:] (alias set 4) Ref 0:int (alias set 4) access: Parm 9 param offset:0 offset:0 size:32 max_size:-1 access: Parm 10 param offset:0 offset:0 size:32 max_size:-1 access: Parm 11 param offset:0 offset:0 size:32 max_size:-1 access: Parm 12 param offset:0 offset:0 size:32 max_size:-1 Base 2:double[0:] (alias set 5) Ref 0:double (alias set 5) access: Parm 8 param offset:0 offset:0 size:64 max_size:-1 Base 3:double[15625] (alias set 5) Ref 0:double (alias set 5) access: Parm 7 param offset:0 offset:0 size:64 max_size:-1 stores: Limits: 32 bases, 16 refs parm 0 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 1 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 2 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 3 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 4 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 5 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 6 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 7 flags: not_returned_directly no_indirect_read parm 8 flags: not_returned_directly no_indirect_read parm 9 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 10 flags: not_returned_directly not_returned_indirectly no_indirect_= read parm 11 flags: not_returned_directly not_returned_indirectly no_indirect_= read parm 12 flags: not_returned_directly not_returned_indirectly no_indirect_= read to: loads: Limits: 32 bases, 16 refs Base 0:int (alias set 4) Ref 0:int (alias set 4) access: access: access: access: access: Parm 2 param offset:0 offset:0 size:32 max_size:32 access: Parm 3 param offset:0 offset:0 size:32 max_size:32 access: Parm 4 param offset:0 offset:0 size:32 max_size:32 Base 1:int[0:] (alias set 4) Ref 0:int (alias set 4) access: Parm 9 param offset:0 offset:0 size:32 max_size:-1 access: Parm 10 param offset:0 offset:0 size:32 max_size:-1 access: Parm 11 param offset:0 offset:0 size:32 max_size:-1 access: Parm 12 param offset:0 offset:0 size:32 max_size:-1 Base 2:double[0:] (alias set 5) Ref 0:double (alias set 5) access: Parm 8 param offset:0 offset:0 size:64 max_size:-1 Base 3:double[15625] (alias set 5) Ref 0:double (alias set 5) access: Parm 7 param offset:0 offset:0 size:64 max_size:-1 stores: Limits: 32 bases, 16 refs parm 2 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 3 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 4 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 7 flags: not_returned_directly no_indirect_read parm 8 flags: not_returned_directly no_indirect_read parm 9 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 10 flags: not_returned_directly not_returned_indirectly no_indirect_= read parm 11 flags: not_returned_directly not_returned_indirectly no_indirect_= read parm 12 flags: not_returned_directly not_returned_indirectly no_indirect_= read This seems to correclty represent that some params was scalarised. Only one oddity is that the list is not optimized and kept in redundant form but it should be harmless. At stream in time we see: Read modref for dco.isra/287 loads: Limits: 32 bases, 16 refs Base 0: alias set 4 Ref 0: alias set 4 access: Parm 9 param offset:0 offset:0 size:32 max_size:-1 access: Parm 10 param offset:0 offset:0 size:32 max_size:-1 access: Parm 11 param offset:0 offset:0 size:32 max_size:-1 access: Parm 12 param offset:0 offset:0 size:32 max_size:-1 Base 1: alias set 3 Ref 0: alias set 3 access: Parm 8 param offset:0 offset:0 size:64 max_size:-1 access: Parm 7 param offset:0 offset:0 size:64 max_size:-1 stores: Limits: 32 bases, 16 refs Try dse parm 2 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 3 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 4 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 7 flags: not_returned_directly no_indirect_read parm 8 flags: not_returned_directly no_indirect_read parm 9 flags: not_returned_directly not_returned_indirectly no_indirect_r= ead parm 10 flags: not_returned_directly not_returned_indirectly no_indirect_= read parm 11 flags: not_returned_directly not_returned_indirectly no_indirect_= read parm 12 flags: not_returned_directly not_returned_indirectly no_indirect_= read So types are translated to alias sets however the stream in is wrong since there was accesses without known params and they are gone. So it is stream= ing bug (and was present already in the initial modref version)=