From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by sourceware.org (Postfix) with ESMTPS id 555C0385840C for ; Thu, 22 Sep 2022 06:00:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 555C0385840C 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-yb1-xb2f.google.com with SMTP id p69so11345645yba.0 for ; Wed, 21 Sep 2022 23:00:04 -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=aaAhMhfIQSO3TpHDd5iu0M4XNd2uP1eKMrhV385pH7g=; b=m25SxGdb5kI+T7U5FJvmVzpONHc6/vwT5aMP4R8KvCvT3yQ43VDSHqWDPnnvoiaWU2 GmTO5mrHEM5kbB0McTJOVaTtZ07D17jbM3VXxlv2kMd2/dcmWiRudYBYORomx2pOWlh7 XcVDzME3UezmTrOUqr0ZI/HHxWrGSp3zzZB0Zf5GxMowKuDJpBqMDwyjPCBY8c6zc4Sk EsYecNSsCmdPA5jDryfkZFyCOByRNk+yX0mk1QNmo0SDji+nLmjMqtTBqTfLfEmIdoDh pUANis9G57D4QgdL6smFZJcfyboALFLTdLtrPFbg70yD6GaOcJWtuJrblg7kA0Q4jFJk uOdw== 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=aaAhMhfIQSO3TpHDd5iu0M4XNd2uP1eKMrhV385pH7g=; b=oXtaN/At1Ne2KwzD0pT8mXVYzyBDmgKg2/AxZYwC92WHVGJmTrbmRV76eZkk91OL7L rga/lCWwlPBnvxHCZP7UDF2p2uOTH0qXH4dLyT+tUGbdVy6qEwCQrNQaxuDmalSU+Wv/ viW3jRIwb8XpdYWf8XO9aF1wGtu4qUi9zdgMsbd+VQIqbgOwvzmv/GK2F0Y0j1XJmM9V CisvuACbOy6sAq7fqt513oy3p6Ou2dl1l/1Sqv06s4nHJ1PJ5z4h7QHW5lbUjVcMHzto uhjQVuTFvbSdUJ1h5df4cgt3JeOZP90V7dz08e/i/T5eaGW2YYYBh/CVdpJLkEOA/Vfa 5C1g== X-Gm-Message-State: ACrzQf0/MrJ1lXnkpbjL0+CJVcSHSQ8ul0yNfrELsrGL3jZNc2ry/OG2 0B9BZcH34ejxRGIsVOl0Y93V3q6lhazZCBPDD0w2tRyB X-Google-Smtp-Source: AMsMyM6P48hQ31NhebbxAC2JuP+OtUEfYG5ozLP2a2D6nv9igmrLKaj1hFpf2aYYAur0ueW9lKmmzuncN3RA9eJ6APs= X-Received: by 2002:a05:6902:1542:b0:6af:4f96:6b5e with SMTP id r2-20020a056902154200b006af4f966b5emr1948831ybu.261.1663826403498; Wed, 21 Sep 2022 23:00:03 -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: Uros Bizjak Date: Thu, 22 Sep 2022 07:59:52 +0200 Message-ID: Subject: Re: [PATCH] [x86] Fix typo in floorv2sf2, should be register_operand for op1, not vector_operand. To: liuhongt Cc: gcc-patches@gcc.gnu.org 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_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 3:18 AM liuhongt via Gcc-patches wrote: > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > Verify 526.blend_r can be rebuilt with the fix. > > Ok for trunk? This patch is OK as obvious. Thanks, Uros. > 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 >