From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) by sourceware.org (Postfix) with ESMTPS id 9648B385BF92 for ; Wed, 1 Apr 2020 22:52:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9648B385BF92 Received: by mail-io1-xd44.google.com with SMTP id q9so1576070iod.4 for ; Wed, 01 Apr 2020 15:52:11 -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=m4bBr9Dcccq8N7RZ9D+Sismiqi5rPKCCCjwp1rxbnVE=; b=iKQsovl+DVB4ma65mAyWgrp5z64sf7+lydL6LOxeKfSvj/M+k5M/qSwLEx5r6o/D7r 9iYCWB0hnl8QfPS2H4BvFjU6/xfh5Q4UY78lvn0o/LeuUKFO1NFQ9jGNPypDQT10OnJT 4YwTH7P1p8R0tb1/ICGaUyQglxJVl/DUvJOMEynoZmbkvgIHBKbhMNVmejCmJW1RuhID wKzGuEPD0yoaCW6HNn2mztNNAMIqgi4U9d2C8buoozntoNkpnfETOi8t+f/J8AtQkcB+ IdX39JhnxCuaUcImGFxc5PFadoNRhYa0ZnniuXKciJUb4p47B2yKz4vFG4r++/2+UpNM RuZw== X-Gm-Message-State: AGi0PuY4g4SXhlFRr3EnMpyxZzGMMogktt33ztNaLGgzJn22N3SzIJy7 Om1CiVXm+gI3X4oLk+PXymorE1VbsPBcqL34GIo= X-Google-Smtp-Source: APiQypKqDtNm9rCIStdySVy/oW35JIW9S6eZz9jPKKsaiwyogtnXVRxQRWbHkZTIGkPd28qcLiGYsCXhLlCteLOwLuI= X-Received: by 2002:a6b:930a:: with SMTP id v10mr107073iod.202.1585781530975; Wed, 01 Apr 2020 15:52:10 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: "H.J. Lu" Date: Wed, 1 Apr 2020 15:51:35 -0700 Message-ID: Subject: Re: [PATCH] Fix PR94043 by making vect_live_op generate lc-phi To: Richard Biener Cc: "Kewen.Lin" , Bill Schmidt , GCC Patches , Segher Boessenkool Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_2, KAM_SHORT, 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: Wed, 01 Apr 2020 22:52:12 -0000 On Mon, Mar 30, 2020 at 4:09 AM Richard Biener via Gcc-patches wrote: > > 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. > > This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94449 -- H.J.