From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by sourceware.org (Postfix) with ESMTPS id D7088398582C for ; Mon, 30 Mar 2020 10:39:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D7088398582C Received: by mail-lf1-x141.google.com with SMTP id t16so12875722lfl.2 for ; Mon, 30 Mar 2020 03:39:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vMVAjd4n6hjSg/0EXGGOET3vwTugnxuCwYsvKWfLelQ=; b=JwrYse5W7g1CyaxWvuboLmiMPP/mfivPTfQ/QUgwSCuzSYj2e1bBn6yTt23D6QLyXl F3rEbLK+sO+3qYbWwe4OcTxZlePyFypQMewrHDJxyPIIFnCqbCQZEWvUp0tR8J91q0ar LEseMPp157ROsF1CNqpMhtYP+Hg2XxIU6Cq/CkBvejWNxbR090X0lBMEiwHNE5V4OfCs JE47isDHBQYymcq/iLhHejHX5hPee67MLaTDCPKs2C4nFQnABFS+vdLhW0cJ+0HKdlK2 BvTvYfXYc3JfvFsoYlBzK5OyeLMhgtkw8WYzGTo3cLu2g/sR8NsCCp4qew+Xbs4ojkeI flkQ== X-Gm-Message-State: AGi0Pua3bxJPO9ErxcG/u45QjS/OzxvDTK1TV990atctXBQvZ1QjqIPC eDsSvvv/YmDJhBTwbmu8E3lujSQftVZAbzm56AU= X-Google-Smtp-Source: APiQypJ3G1SQwjdMR84eTWJkAo5hbcV4zqo1UW+M5pbJ4JuxZZy8jlBbqgcbRb98QXKFRIe8xvOfxrKN1Ljzi8ZO8RI= X-Received: by 2002:ac2:4d02:: with SMTP id r2mr1945139lfi.160.1585564745670; Mon, 30 Mar 2020 03:39:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Mon, 30 Mar 2020 12:38:53 +0200 Message-ID: Subject: Re: [PATCH] Fix PR94043 by making vect_live_op generate lc-phi To: "Kewen.Lin" Cc: GCC Patches , Segher Boessenkool , Bill Schmidt Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_2, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2020 10:39:08 -0000 On Mon, Mar 30, 2020 at 12:24 PM Kewen.Lin wrote: > > Hi, > > As PR94043 shows, my commit r10-4524 exposed one issue in > vectorizable_live_operation, which inserts one extra BB > before the single exit, leading unexpected operand expansion > and unexpected loop depth assertion. As Richi suggested, > this patch is to teach vectorizable_live_operation to > generate loop closed phi for vec_lhs, it looks like: > loop; > # lhs' = PHI > => > loop; > # vec_lhs' = PHI > new_tree = BIT_FIELD_REF ; > lhs' = new_tree; > > I noticed that there are some SLP cases that have same lhs > and vec_lhs but different offsets, which can make us have > more PHIs for the same vec_lhs there. But I think it would > be fine since only one of them is actually live, the others > should be eliminated by the following dce. So the patch > doesn't check whether there is one phi for vec_lhs, just > create one directly instead. > > Bootstrapped/regtested on powerpc64le-linux-gnu (LE) P8. > > Is it ok for trunk? OK. Thanks, Richard. > BR, > Kewen > ----------- > > gcc/ChangeLog > > 2020-MM-DD Kewen Lin > > PR tree-optimization/94043 > * tree-vect-loop.c (vectorizable_live_operation): Generate loop-closed > phi for vec_lhs and use it for lane extraction. > > gcc/testsuite/ChangeLog > > 2020-MM-DD Kewen Lin > > PR tree-optimization/94043 > * gfortran.dg/graphite/vect-pr94043.f90: New test. >