From patchwork Thu Sep 22 01:15:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: liuhongt X-Patchwork-Id: 1351 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp2211097wrt; Wed, 21 Sep 2022 18:18:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7o6usnfahphnHMVoPpcnzvu7JCV46hgsl1j+iunaAmAKKOSMfRg9JeWRgZfUUU+vbKpK2P X-Received: by 2002:a17:907:6096:b0:780:c085:21b4 with SMTP id ht22-20020a170907609600b00780c08521b4mr745039ejc.293.1663809529877; Wed, 21 Sep 2022 18:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663809529; cv=none; d=google.com; s=arc-20160816; b=Zx4aOiUwciXWgiabsePvvcgTBTbeVTKM9VvWE38dwgiTJCXXhQzNCgvc98YnInPaMa MZ0GuHmKyTtYCdTu+9FP4sJocoJ4pdY3rd18SoupBxfyBEw6eV2qNCI9TjlUkFqb5nth 1jf9hK5XtmIVF745+0d9XtThDBratrebWJ8MGJIUw9a95fgD8b9ZdAtdmQCK21uoJSCo jXD/pfbKm25KZEHmzjVCj3OGvRc3CmpXN83A5Fm7RMMzM3GdOy37xTRTg1arUsq3+ZvX WwmNJxNEboD0xoTjvG0171Q6kTD9ZvB2Ay2xgXq1Nja7zxgY4qsVXLid2ojsuypfgV7m edkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=whmRirAewp4TjPrjVdRkTMyP0Sw4lZhSk0s7DKFJoKA=; b=RT4fgXvUTCP49s2iogNyVVZtsc4b3K0DTLU9jgIpmX0g4nTgI7ukWGEH5lwFdkFGYU sWvkSCJWQ4PaC2M/vIOuEA8xvYhUDRvdy3rnXQJS7zC3GtOOcyqW2pRPFVF+VwoBfV65 Z5A8pLNSz3N2i6FNakJmDDv70R5uHZUQvcwU69LPHlbraqWKDrsRQtJwawKiPrNCSm0a MHQ42kUb8GxKiJKnBQvJcHDtN7jYJH1Z8/wqvFAjOi8w18ykqUQGa4i9CBmQngBhRaWv pCYeg4kPackXEpTtRgCA+lBKDRU/Co0pFOt99Xc3IU41SfrzsaDt0pzPsFrDYFRpYxas Jhpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Zyhy9JWZ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id k3-20020a50c8c3000000b00445e20bc95bsi3406007edh.428.2022.09.21.18.18.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 18:18:49 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Zyhy9JWZ; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 37F3D38582A1 for ; Thu, 22 Sep 2022 01:18:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 37F3D38582A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663809528; bh=whmRirAewp4TjPrjVdRkTMyP0Sw4lZhSk0s7DKFJoKA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=Zyhy9JWZBpj8t6YHe6iZ6CJ9+jx3T6ELgI65RZtvfDY8UHbj7UkFRxp3wO6EMX7qu lHtNwG5JPPO8W1wuMkCQr1NlU9bAv5QIDzKATuL2MFPs9MdsWtYsFhw1oWsjm2M2ic +3bLakBx3s4E8W+EceGeRRo8p8TBkEEp06yYxllc= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by sourceware.org (Postfix) with ESMTPS id 9448C3858C74 for ; Thu, 22 Sep 2022 01:18:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9448C3858C74 X-IronPort-AV: E=McAfee;i="6500,9779,10477"; a="279889694" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="279889694" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2022 18:17:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="621905989" Received: from shvmail03.sh.intel.com ([10.239.245.20]) by fmsmga007.fm.intel.com with ESMTP; 21 Sep 2022 18:17:53 -0700 Received: from shliclel4051.sh.intel.com (shliclel4051.sh.intel.com [10.239.240.51]) by shvmail03.sh.intel.com (Postfix) with ESMTP id 06677100B7E3; Thu, 22 Sep 2022 09:17:53 +0800 (CST) To: gcc-patches@gcc.gnu.org Subject: [PATCH] [x86] Fix typo in floorv2sf2, should be register_operand for op1, not vector_operand. Date: Thu, 22 Sep 2022 09:15:54 +0800 Message-Id: <20220922011554.796669-1-hongtao.liu@intel.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, SPF_HELO_PASS, SPF_NONE, 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 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-Patchwork-Original-From: liuhongt via Gcc-patches From: liuhongt Reply-To: liuhongt Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1744630741987847778?= X-GMAIL-MSGID: =?utf-8?q?1744630741987847778?= 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(); +}