From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54795 invoked by alias); 26 Jun 2015 11:03:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 54656 invoked by uid 89); 26 Jun 2015 11:03:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_05,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 26 Jun 2015 11:03:38 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-5-C_k069bARIyCnMQWWExnkg-1 Received: from shawin233 ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 26 Jun 2015 12:03:30 +0100 From: "Bin Cheng" To: Subject: [PATCH PR66638]Fix assertion failure by skip the case. Date: Fri, 26 Jun 2015 11:06:00 -0000 Message-ID: <000c01d0afff$b937fd80$2ba7f880$@arm.com> MIME-Version: 1.0 X-MC-Unique: C_k069bARIyCnMQWWExnkg-1 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000D_01D0B042.C7615800" X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg01934.txt.bz2 This is a multipart message in MIME format. ------=_NextPart_000_000D_01D0B042.C7615800 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-length: 457 Hi, This patch fixes GCC's profiled bootstrap failure. As comment added by in patch, it may still be possible to prove no overflow information for some scev, unfortunately it's a rare case observed during GCC profiled bootstrap. So for now I just skip it. Is this OK? Thanks, bin 2015-06-26 Bin Cheng PR bootstrap/66638 * tree-ssa-loop-niter.c (loop_exits_before_overflow): Skip if assertion failed. Remove assertion itself. ------=_NextPart_000_000D_01D0B042.C7615800 Content-Type: text/plain; name=pr66638.txt Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="pr66638.txt" Content-length: 1157 Index: gcc/tree-ssa-loop-niter.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- gcc/tree-ssa-loop-niter.c (revision 224827) +++ gcc/tree-ssa-loop-niter.c (working copy) @@ -3955,7 +3955,21 @@ loop_exits_before_overflow (tree base, tree step, if (!CONVERT_EXPR_P (e) || !operand_equal_p (e, unsigned_base, 0)) continue; e =3D TREE_OPERAND (e, 0); - gcc_assert (operand_equal_p (e, base, 0)); + /* It may still be possible to prove no overflow even if condition + "operand_equal_p (e, base, 0)" isn't satisfied here, like below + example: + + e : ssa_var ; unsigned long type + base : (int) ssa_var + unsigned_base : (unsigned int) ssa_var + + Unfortunately this is a rare case observed during GCC profiled + bootstrap. See PR66638 for more information. + + For now, we just skip the possibility. */ + if (!operand_equal_p (e, base, 0)) + continue; + if (tree_int_cst_sign_bit (step)) { code =3D LT_EXPR; ------=_NextPart_000_000D_01D0B042.C7615800--