From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 89199 invoked by alias); 19 Aug 2015 01:54:57 -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 89080 invoked by uid 89); 19 Aug 2015 01:54:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f174.google.com Received: from mail-ob0-f174.google.com (HELO mail-ob0-f174.google.com) (209.85.214.174) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 19 Aug 2015 01:54:55 +0000 Received: by obbhe7 with SMTP id he7so156983170obb.0 for ; Tue, 18 Aug 2015 18:54:53 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.250.195 with SMTP id ze3mr8351799obc.74.1439949293328; Tue, 18 Aug 2015 18:54:53 -0700 (PDT) Received: by 10.76.94.211 with HTTP; Tue, 18 Aug 2015 18:54:53 -0700 (PDT) In-Reply-To: <55D37601.6060200@redhat.com> References: <000401d0c918$d7a2e780$86e8b680$@arm.com> <55D37601.6060200@redhat.com> Date: Wed, 19 Aug 2015 02:45:00 -0000 Message-ID: Subject: Re: [PATCH GCC]Improve bound information in loop niter analysis From: "Bin.Cheng" To: Jeff Law Cc: Richard Biener , Bin Cheng , GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg01041.txt.bz2 On Wed, Aug 19, 2015 at 2:14 AM, Jeff Law wrote: > On 08/17/2015 04:01 AM, Bin.Cheng wrote: >>> >>> >>> + c0 = fold_convert (type, c0); >>> + c1 = fold_convert (type, c1); >>> + >>> + if (operand_equal_p (var, c0, 0)) >>> >>> I believe if c0 is not already of type type operand-equal_p will never >>> succeed. >> >> It's quite specific case targeting comparison between var and it's >> range bounds. Given c0 is in form of "var + offc0", then the >> comparison "var + offc0 != range bounds" doesn't have any useful >> information. Maybe useless type conversion can be handled here >> though, it might be even corner case. > > My comment about useless type conversions was more about a deficiency in > operand_equal_p's implementation. It wasn't something I felt needed to be > addressed in your patch. > > I think using operand_equal_p is fine here. Hi Jeff, I misunderstood the point. Thanks for explanation. Given the approval, new version patch is applied. Thanks, bin > > > Jeff