From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7ACE3385E01D; Mon, 23 Mar 2020 09:57:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7ACE3385E01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584957450; bh=uJ8k/cTRvQb2dRimUkNh8uMJjsQxDenvExUeCFqskqA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=I1gbLqs+Ugr+ITaGQVRSq8FBrAzmoY7D3CvXGASakMseH39xpmIlip5VAZY97Tj9+ AMyUFTcLtcqdcSnEdmTk6/73apJNrOq+qBi+63bdnPs1byoUjFSz73IJ+wlOLxWRDH eiV3H0z2byklb7guWZtPiU2wonCabEtwayoX14Xc= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94261] [10 Regression] ICE in vect_get_vec_def_for_operand_1 for 3-element condition reduction Date: Mon, 23 Mar 2020 09:57:30 +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: 10.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org 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: 10.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: Mon, 23 Mar 2020 09:57:30 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94261 --- Comment #2 from Richard Biener --- So I think we can avoid swapping operands but what we cannot (current) avoid is adjusting the tree code. The operand swapping should be subsumed by get_slp_defs no longer looking at the scalar stmt for mapping operand number to defs but using the SLP children exclusively. But of course we're still looking at the actual comparison code - which we _could_ copy to the SLP node as well - or is the comparison code adjustment not an issue here? Quickly scanning I only see vectorizable_condition ever looking at the code so there would be only a single place to adjust. I'm not sure about test coverage, on x86_64 I see only FAIL: gcc.dg/vect/vect-cselim-1.c (internal compiler error) FAIL: gcc.dg/vect/vect-cselim-1.c (test for excess errors) FAIL: gcc.dg/vect/vect-cselim-1.c scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: gcc.dg/vect/slp-cond-1.c (internal compiler error) FAIL: gcc.dg/vect/slp-cond-1.c (test for excess errors) FAIL: gcc.dg/vect/slp-cond-1.c scan-tree-dump-times vect "vectorizing stmts using SLP" 3 FAIL: gcc.dg/vect/slp-cond-2-big-array.c (internal compiler error) FAIL: gcc.dg/vect/slp-cond-2-big-array.c (test for excess errors) FAIL: gcc.dg/vect/slp-cond-2-big-array.c scan-tree-dump-times vect "vectori= zing stmts using SLP" 3 FAIL: gcc.dg/vect/slp-cond-2.c (internal compiler error) FAIL: gcc.dg/vect/slp-cond-2.c (test for excess errors) FAIL: gcc.dg/vect/slp-cond-2.c scan-tree-dump-times vect "vectorizing stmts using SLP" 3 FAIL: gcc.dg/vect/slp-cond-3.c (internal compiler error) FAIL: gcc.dg/vect/slp-cond-3.c (test for excess errors) FAIL: gcc.dg/vect/slp-cond-3.c scan-tree-dump-times vect "vectorizing stmts using SLP" 1 when placing gcc_unreachable () at the swapping place and most testcases still pass when removing the IL operand swapping, only vect-cselim-1.c runfails (investigating). I'd love to get rid of that last operand swapping case (because I'd like to get rid of STMT_VINFO_NUM_SLP_USES...). Yes, I'm working on adding a vecty= pe to slp_tree ...=