From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20023 invoked by alias); 29 Mar 2012 10:02:52 -0000 Received: (qmail 20013 invoked by uid 22791); 29 Mar 2012 10:02:51 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Mar 2012 10:02:36 +0000 Received: by ggcy3 with SMTP id y3so1389101ggc.20 for ; Thu, 29 Mar 2012 03:02:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.125.4 with SMTP id c4mr10159319ann.52.1333015355784; Thu, 29 Mar 2012 03:02:35 -0700 (PDT) Received: by 10.147.153.12 with HTTP; Thu, 29 Mar 2012 03:02:35 -0700 (PDT) Date: Thu, 29 Mar 2012 10:02:00 -0000 Message-ID: Subject: Missed optimization in PRE? From: "Bin.Cheng" To: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg00461.txt.bz2 Hi, Following is the tree dump of 094t.pre for a test program. Question is loads of D.5375_12/D.5375_14 are redundant on path , but why not lowered into basic block 3, where it is used. BTW, seems no tree pass handles this case currently. Any idea? Thanks int z$imag; int z$real; int D.5378; int D.5377; int D.5376; int D.5375; : D.5375_11 = REALPART_EXPR ; D.5376_12 = IMAGPART_EXPR ; D.5377_13 = REALPART_EXPR ; D.5378_14 = IMAGPART_EXPR ; if (D.5375_11 == D.5377_13) goto ; else goto ; : if (D.5376_12 == D.5378_14) goto ; else goto ; : z$real_15 = REALPART_EXPR ; z$imag_16 = IMAGPART_EXPR ; goto ; : : z$real_17 = REALPART_EXPR ; z$imag_18 = IMAGPART_EXPR ; : # z$real_19 = PHI # z$imag_20 = PHI REALPART_EXPR = z$real_19; IMAGPART_EXPR = z$imag_20; return 0; -- Best Regards.