From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id ED19F3877432 for ; Tue, 27 Jul 2021 08:57:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ED19F3877432 Received: by mail-ej1-x632.google.com with SMTP id nd39so20936547ejc.5 for ; Tue, 27 Jul 2021 01:57:39 -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=XDvAvgSn+h766++giW/IGGu4d4iu8+xbncsnajVuZA0=; b=PwS9K98AN99ltzPsbCD1Kgao4AM5Em+aJIlpQLxNZAgo05tz33KZKh6kOQPs7MtLGh HqDjnfJiq7Zndg/i/UXtv9pvNDE1wftcOQuvlQ/vvpWfY70IbSDsqB0YLa/bQS3F43Lh rboKV1T50WlL/YeFvEo7gp7++PnfkY+a41jlq+1hAE0uHtl9YAcMkRMZfylIBR2c29E5 D0fhH50PjwWwLbUEYvJeY6Ga5c1B17EuhEWae4BoF3q99sFqMdQiAP7COyJcHV16Z5oD EO5JCiLQOl0SbRwI7dhFr2AW88omv8lclpSzdQ5oJGTcdsFr10OpKZuUZFSm6E9feGsf ezrg== X-Gm-Message-State: AOAM533iYEfduIVDq1BBRxXjcW2mFllNjIo5W3HyXVh/Q/OBjbc8qNXF FvOefvnDnMtb0NRyHYZ5n392ou0sMruJx2sDyt0= X-Google-Smtp-Source: ABdhPJyWks9+lDWf5zdf4g0m4zbXHfXX19AKEeIzZooxQYelSJyzwTVTjbcWQ827Z5uhyR6qEVqycQDI9xs+xmPbugw= X-Received: by 2002:a17:906:16cd:: with SMTP id t13mr21437823ejd.250.1627376259100; Tue, 27 Jul 2021 01:57:39 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Tue, 27 Jul 2021 10:57:28 +0200 Message-ID: Subject: Re: [PATCH] vect: Fix wrong check in vect_recog_mulhs_pattern [PR101596] To: "Kewen.Lin" Cc: GCC Patches , Richard Sandiford Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 27 Jul 2021 08:57:41 -0000 On Tue, Jul 27, 2021 at 5:21 AM Kewen.Lin wrote: > > Hi, > > As PR101596 showed, vect_recog_mulhs_pattern uses target_precision to > check the scale_term is expected or not, it could be wrong when the > precision of the actual used new_type larger than target_precision as > shown by the example. > > This patch is to use precision of new_type instead of target_precision > for the scale_term matching check. > > Bootstrapped & regtested on powerpc64le-linux-gnu P10, > powerpc64-linux-gnu P8, x86_64-redhat-linux and aarch64-linux-gnu. > > Is it ok for trunk? OK. Richard. > BR, > Kewen > ----- > gcc/ChangeLog: > > PR tree-optimization/100696 > * tree-vect-patterns.c (vect_recog_mulhs_pattern): Fix wrong check > by using new_type's precision instead. > > gcc/testsuite/ChangeLog: > > PR tree-optimization/100696 > * gcc.target/powerpc/pr101596-1.c: New test. > * gcc.target/powerpc/pr101596-2.c: Likewise. > * gcc.target/powerpc/pr101596-3.c: Likewise.