From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 40957385702E; Mon, 29 Mar 2021 16:31:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40957385702E From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/99726] [10/11 Regression] ICE in create_intersect_range_checks_index, at tree-data-ref.c:1855 since r10-4762-gf9d6338bd15ce1fae36bf25d3a0545e9678ddc58 Date: Mon, 29 Mar 2021 16:31:10 +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: 11.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub 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: 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: Mon, 29 Mar 2021 16:31:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99726 --- Comment #2 from Jakub Jelinek --- And -flive-patching=3Dinline-clone -mavx512f -O2 -floop-nest-optimize -ftree-loop-vectorize -ftrapv -m32 is sufficient to trigger it. I'm afraid I'm lost in what exactly the code wants to do. dr_a.dr: #(Data Ref:=20 # bb: 57=20 # stmt: _231 =3D a[_238][_242]; # ref: a[_238][_242]; # base_object: a; # Access function 0: {(unsigned int) (_239 - graphite_IV.18_206) + 2, +, 4294967295}_6 # Access function 1: {((unsigned int) (graphite_IV.18_206 + _234) + e.6_19= ) + 4294967295, +, 1}_6 #) dr_b.dr: #(Data Ref:=20 # bb: 57=20 # stmt: a[_250][_254] =3D _243; # ref: a[_250][_254]; # base_object: a; # Access function 0: {(unsigned int) (_251 - graphite_IV.18_206) + 1, +, 4294967295}_6 # Access function 1: {(unsigned int) (graphite_IV.18_206 + _247) + e.6_19,= +, 1}_6 #) DR_STEP (dr_a.dr) =3D=3D DR_STEP (dr_b.dr) =3D=3D 4092, so it is not neg_st= ep: bool neg_step =3D tree_int_cst_compare (DR_STEP (dr_a.dr), size_zero_node= ) < 0; /* Index must evaluate in the same direction as DR. */ gcc_assert (!neg_step || tree_int_cst_sign_bit (idx_step) =3D=3D 1); but this doesn't check anything if neg_step is false, rather than ensuring = it has the same direction. And offset_int abs_idx_step =3D offset_int::from (wi::to_wide (idx_step), SIGNED); if (neg_step) abs_idx_step =3D -abs_idx_step; offset_int::from will treat the unsigned int idx_step of -1U as -1 and the asserts fail because it is not non-negative.=