From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81539 invoked by alias); 21 Dec 2017 23:09:08 -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 81523 invoked by uid 89); 21 Dec 2017 23:09:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:808 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Dec 2017 23:09:06 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C3EA7C047B65; Thu, 21 Dec 2017 23:09:05 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-2.rdu2.redhat.com [10.10.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 435AE17136; Thu, 21 Dec 2017 23:09:04 +0000 (UTC) Subject: Re: [PATCH] Fix ICE with widen_mult and -ftrapv (PR tree-optimization/83523) To: Jakub Jelinek , Richard Biener Cc: gcc-patches@gcc.gnu.org References: <20171221175451.GB2353@tucnak> From: Jeff Law Message-ID: <80ae8993-282e-eaf2-cb35-411cd2ca9712@redhat.com> Date: Thu, 21 Dec 2017 23:09:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171221175451.GB2353@tucnak> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg01469.txt.bz2 On 12/21/2017 10:54 AM, Jakub Jelinek wrote: > Hi! > > Converting widening mult, or widen_{plus,minus}_expr, or integral mult to > fma is IMNSHO undesirable with -ftrapv for signed types - the expansion of > those doesn't detect overflows and by giving up we don't need to worry about > formerly trapping MULT_EXPR becoming something that isn't trapping and > performing EH cleanups etc. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2017-12-21 Jakub Jelinek > > PR tree-optimization/83523 > * tree-ssa-math-opts.c (is_widening_mult_p): Return false if > for INTEGER_TYPE TYPE_OVERFLOW_TRAPS. > (convert_mult_to_fma): Likewise. > > * g++.dg/tree-ssa/pr83523.C: New test. OK. jeff