From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw1-x112d.google.com (mail-yw1-x112d.google.com [IPv6:2607:f8b0:4864:20::112d]) by sourceware.org (Postfix) with ESMTPS id C61313858C74 for ; Thu, 22 Sep 2022 01:19:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C61313858C74 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-346cd4c3d7aso83343267b3.8 for ; Wed, 21 Sep 2022 18:19:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=0Dcc9MSHHl1z5mbOdzHWOb5dJERuB+8oBVWJCxuTT7U=; b=KYV18xxuOSblT3IbFG4vS33ArZXMQStw82JYYk2gVVXGfHOqhR4ehBb2veR6pXapge g1DLzaPHjeRR71/PXSafkZVc3M0DcrGEbD0RldKr2fibuWqNLBbPubIo0Tn9HHA1ynId t9W0OcT2YQ8aKyf7NrwDIam4rBfJjMtoggRuAlJ2CFmtGYxg747KJsbJxpv9lPRLaFcr mmpfTCW/ZQvGx0BVLB4em5M6xBYSVscHxNUg9Pc8YZxyA1/iUm3cSF06cqRgQj4Fvxb3 Syksn7bi/trHGM3ZLtqGtmM+jmE4ZXe7exYuCRSkQPSUsg3pMHmokppy4PH2SfeSY0PP hYeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=0Dcc9MSHHl1z5mbOdzHWOb5dJERuB+8oBVWJCxuTT7U=; b=Mr5d76tlnWRN/ThnNguZQgs8jFG6SGpmIeUSGKircWtHKCsfMRR1rKIdVv0YKVFtPS c73WS6W6x1lU2tJZDWNZSVO7BUGbkVpVdQQgjcmIN2J6EmqXfonjrAqRN3Sy1kQ/eSMB ImupiO3E94fk8IMINRWuUpQUdE+aeu9EZw8ods3Yasut2uyd6cs8BDMBFSfqBNjzc5Ge 7CzW7BIqq8xyGrLMkQ2AizO8U0Vqgy/FNb2P2k3ElES5ul4/NO30gwFxM4bObm1tIhhP TvECFCvWo3PJDP+d8AzFaJr+ceO+mVdEaTKnxlHFxHE34OToBjo3VMtarpSL/i/u4gW4 Jjbg== X-Gm-Message-State: ACrzQf2256nTkfXkKmGj4bHL9PM595rm+bAnHfikCOPx2kOY4C2VKuEg iMoKYmfv9+T8JEPHPYW5/xIDjrZuctyXricsF1Y= X-Google-Smtp-Source: AMsMyM5zOWy5BXO9EUnRIliaXTbsvn5+jTv5WBBEQdhaAed6bh+7r++1Kthzcml38o2xQVy/0bOi7FS9Y5Jeh1TluLw= X-Received: by 2002:a81:46c4:0:b0:345:2b23:17d6 with SMTP id t187-20020a8146c4000000b003452b2317d6mr990623ywa.344.1663809581343; Wed, 21 Sep 2022 18:19:41 -0700 (PDT) MIME-Version: 1.0 References: <20220922011554.796669-1-hongtao.liu@intel.com> In-Reply-To: <20220922011554.796669-1-hongtao.liu@intel.com> From: Hongtao Liu Date: Thu, 22 Sep 2022 09:22:20 +0800 Message-ID: Subject: Re: [PATCH] [x86] Fix typo in floorv2sf2, should be register_operand for op1, not vector_operand. To: Uros Bizjak Cc: gcc-patches@gcc.gnu.org, hjl.tools@gmail.com 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_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Sep 22, 2022 at 9:17 AM liuhongt wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Verify 526.blend_r can be rebuilt with the fix. > > Ok for trunk? > > gcc/ChangeLog: > > PR target/106994 > * config/i386/mmx.md (floorv2sf2): Fix typo, use > register_operand instead of vector_operand for operands[1]. > > gcc/testsuite/ChangeLog: > > * gcc.target/i386/pr106994.c: New test. > --- > gcc/config/i386/mmx.md | 2 +- > gcc/testsuite/gcc.target/i386/pr106994.c | 24 ++++++++++++++++++++++++ > 2 files changed, 25 insertions(+), 1 deletion(-) > create mode 100644 gcc/testsuite/gcc.target/i386/pr106994.c > > diff --git a/gcc/config/i386/mmx.md b/gcc/config/i386/mmx.md > index 222a041de58..c359e2dd6de 100644 > --- a/gcc/config/i386/mmx.md > +++ b/gcc/config/i386/mmx.md > @@ -1676,7 +1676,7 @@ (define_expand "lceilv2sfv2si2" > (define_expand "floorv2sf2" > [(set (match_operand:V2SF 0 "register_operand") > (unspec:V2SF > - [(match_operand:V2SF 1 "vector_operand") > + [(match_operand:V2SF 1 "register_operand") > (match_dup 2)] > UNSPEC_ROUND))] > "TARGET_SSE4_1 && !flag_trapping_math > diff --git a/gcc/testsuite/gcc.target/i386/pr106994.c b/gcc/testsuite/gcc.target/i386/pr106994.c > new file mode 100644 > index 00000000000..0803311dc75 > --- /dev/null > +++ b/gcc/testsuite/gcc.target/i386/pr106994.c > @@ -0,0 +1,24 @@ > +/* { dg-do compile } */ > +/* { dg-options "-march=skylake -Ofast" } */ > + > +typedef struct { > + float ymin, ymax; > +} rctf; > + > +rctf view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked; > +float view2d_map_cur_using_maskUI_view2d_view_ortho_yofs; > + > +void BLI_rctf_translate(); > +void glLoadIdentity(); > + > +void > +view2d_map_cur_using_maskUI_view2d_view_ortho() { > + BLI_rctf_translate(&view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked); > + view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked.ymin = > + __builtin_floor(view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked.ymin) - > + view2d_map_cur_using_maskUI_view2d_view_ortho_yofs; > + view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked.ymax = > + __builtin_floor(view2d_map_cur_using_maskUI_view2d_view_ortho_curmasked.ymax) - > + view2d_map_cur_using_maskUI_view2d_view_ortho_yofs; > + glLoadIdentity(); > +} > -- > 2.27.0 > -- BR, Hongtao