From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by sourceware.org (Postfix) with ESMTPS id 9E8F93858401 for ; Fri, 13 Oct 2023 08:12:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9E8F93858401 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697184751; x=1728720751; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=Mz446ufBwjjBibNgGiSB0HFRa6M5IcZf/1v2uOA2wQA=; b=d/qW+zDfqtD/owbyaS526wc68ijmgT1Ng31O6rPI+g4ZUFg07HAze0Su yAKF/07FwuUuui/OEYKUo7QoUCQY0Zop4GgXwQyrht/8DSHe0Wkzd8iR8 VuOZ5VI4OK843O2hliD/QEi813VjEgS6vq2lmg2cbV3V4bq6r2PjrH/jq wx9s1dLr4u71h/DfWycggqgyhnY82UY7Febsf8+vTccyecJArViMflYAW Ihx8eZlkhMPUrXw1PvNOmUivuoqo/2sNjwwWbIK7c5N5sz9GWg2rNP0Z1 ImUlBdNqbzG/Oi3taUMxJ8YqbIuxykyJHsvaWE4Y0WnkJkW/5/TqZIKiR w==; X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="383993229" X-IronPort-AV: E=Sophos;i="6.03,221,1694761200"; d="scan'208,217";a="383993229" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2023 01:12:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10861"; a="704549204" X-IronPort-AV: E=Sophos;i="6.03,221,1694761200"; d="scan'208,217";a="704549204" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 13 Oct 2023 01:12:05 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 13 Oct 2023 01:12:04 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Fri, 13 Oct 2023 01:12:04 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.100) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Fri, 13 Oct 2023 01:12:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YsvkfUTciIq9fGFB6I+7SHkDJQ3Y/bvnnzJSY18AP2lDIYvhKyigtjpIV86T99yoM9XNhHbf8HT1CYjbS3n6UwqpB5O8OnrgRJ7kJYFphyiD4P0zSrQSEsnb+7KDi0g51lnKJ+yxk7V+xCLnEePFYC8vHGfRRiFJTo1mYYGyMHV0+jyxlR202kfCXB4pf+ZM7FOrLcoMcAVrOPfjS5d+Db2ZPjx6Uh+rqMjM1trrgaDn5DWSc6fqFB5NTrnpPsQjKYFQ7DaFB7kZya7/DjL69iGyT+PAxmToQjSF5v2ZpcaFkKDMv6YiW+gFsS1SRayEvKERl2FVj4NGMQ25RV4kTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8/zQyfsBQSxC1uoYHiA8Hj4Ngav591saQjF0eQMqT1Y=; b=hqI8dkA/0XoMWQv2zAuIZHhgs9Uujg9ubBK6HTKxbELj2omIdcUVtp3DWRMDzAAjnV/LqHJomr6bDX7bwzUD/HbLmTwR5tlXr8MLwVp3XEdJPHy0Wvo5VZbvRM0NVV13Epja6eZNpip0Q/YqHDq9dF0J3l8FU/5PcpF70bp6a+qbyHbWfNln4WNqYsj2BP9JguEGZownS9sfnNJ+UxB9+Y87ZRIowT7MP/+lJgWS94jB0kdE95ROXDmbVGD1pbTQ2c6H1+qjPg4MvunSUIHoH6xyDpc12mRkh11EpcwE2mI/fbS1ujcdCcjD/HrlpS0f73QWkuPeSGcTGknq1vY8Gw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from MW5PR11MB5908.namprd11.prod.outlook.com (2603:10b6:303:194::10) by PH0PR11MB7496.namprd11.prod.outlook.com (2603:10b6:510:280::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.36; Fri, 13 Oct 2023 08:12:01 +0000 Received: from MW5PR11MB5908.namprd11.prod.outlook.com ([fe80::4317:53a0:2638:358c]) by MW5PR11MB5908.namprd11.prod.outlook.com ([fe80::4317:53a0:2638:358c%4]) with mapi id 15.20.6863.043; Fri, 13 Oct 2023 08:12:01 +0000 From: "Li, Pan2" To: "juzhe.zhong@rivai.ai" , gcc-patches CC: "Wang, Yanzhang" , kito.cheng Subject: RE: [PATCH v1] RISC-V: Add test for FP iceil auto vectorization Thread-Topic: [PATCH v1] RISC-V: Add test for FP iceil auto vectorization Thread-Index: AQHZ/aw6Zq1Yyxrb30iy5Q0sJnMXKrBHXdTmgAAAqZA= Date: Fri, 13 Oct 2023 08:12:00 +0000 Message-ID: References: <20231013080643.1813480-1-pan2.li@intel.com> <17570601FD189E79+202310131608160886427@rivai.ai> In-Reply-To: <17570601FD189E79+202310131608160886427@rivai.ai> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW5PR11MB5908:EE_|PH0PR11MB7496:EE_ x-ms-office365-filtering-correlation-id: b4148013-b97e-4d84-c71c-08dbcbc413c2 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dXvt9hRx/8bT625dt3EchozHdqbcz8bI3JeAH2fVAaQQltruVXcl5BbqUfAp0aDOkbveTUubjIfyVlwtYD0Q4wl79WXH9Punz/16SIx5aOm7bwbVLPSGOB3aSP+Xqq/myPSxmF2zHsqnZacOgDwAk2QHHCKRd37M0dLb+3ou0JGvXjqPlL9xwOvfcnj45jMmTuhkhSiSA6r6jmUIZLZ8XlQu7/UkC14mUOUQRRWBd2vebGQkpJf/IV7r+LCJlWIqUTmjvDLFLvjavR/G3ghSy+xV0kOVGEK+a/pnbbZQmq5ovpgwVRKPBqkgR2/H7BE3C7H7mil2MSMLz3titT7F31sCGduzvDBMGgwp/MAHbEDyw07QA6yRwDOcST1/OLOBH+WmpGEy4QjNsmN1LPMeF6YZfQX+or1Saw8lFNuYJEAPAuzn+6KwTsb4gLiAOIeWipagiY1CTuRV2MSLt/EDAxF51aKubDN4rnh2s21MVFkQIFNVwMSRtAxpqKsMVFmwBEUhu/2XtZLDm1Fgumwum08Mcm7DU6VNbz+ioRklvlNC6rvUoGO9YGVT6grZAqgxKOUbCAo2e+S/PJ2CIOQa3uHaiGoBGPIBdU5albe2p9zfWQLALSbHfJBizfwI2K0Q182ApldkG3q+4Bw2HOZyLw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW5PR11MB5908.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(396003)(39860400002)(366004)(136003)(346002)(230922051799003)(186009)(1800799009)(451199024)(64100799003)(41300700001)(6506007)(53546011)(71200400001)(2906002)(7696005)(66476007)(66946007)(4326008)(4001150100001)(478600001)(8676002)(76116006)(66556008)(66446008)(54906003)(52536014)(64756008)(5660300002)(110136005)(316002)(8936002)(122000001)(55016003)(82960400001)(33656002)(86362001)(38100700002)(38070700005)(84970400001)(9686003)(579004)(559001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ekCgFr2p2gInurfeAyAmpWMeqN5oGdxlEzYMCaZwkNLYOFSxoqrGeVNRe1+n?= =?us-ascii?Q?NaPj+voLd3eVToN/neYhQwZHB5NTuNmc7u8+p1HRWH9n4Rp/z+g7yr3bGbci?= =?us-ascii?Q?woK5m3BVLqj4dJOcG2troZEcIMPJ5TSE7t56UKuJIjgYfbzXNmPbQNbSN29b?= =?us-ascii?Q?LzGLvyaXLshPPWf0JLxL/EO9w3/ZlRXnz036geWU4xCxGtwAT+Gll+88TyTm?= =?us-ascii?Q?yEaRPmbj8LT9qMf9EkoLfBIG8DH1MJ9dw+nHjX+nWZ6uSXpdlr6V9L5HBv0F?= =?us-ascii?Q?d0ake9qvqIWq0rTcwRCoGt/rK4F9WdDqLpgFQeJC0wVBJ9cOtVuQjINDNMgk?= =?us-ascii?Q?leyfWpYFVOi/bPICIu/hcthFZzlTzhiRg4aOrk9C/h/4mcFPbdMpTH8CiU6W?= =?us-ascii?Q?eYPAjfadBQEk23/U+nXVSYl+1aL9mABOOTrxewGGx1bdIjcKmft7ZNAq3ScC?= =?us-ascii?Q?zVN82aa47qy3ehnVjAklULX5ZMqvhbZoFcNpkGXO496vmQyHsv8W697lKKY+?= =?us-ascii?Q?faiyAi8DN3n45VvRbyCEnuNWZsvfIXJX/tGd3m7hM9Qc8JO+FN/+istgKoO8?= =?us-ascii?Q?7IrUnE1dwAmvy6HzcElSxQs/THahCc+AmkZjaK7wOlipQL9rrbgR6JtP2ttO?= =?us-ascii?Q?ODatMmffvbzGaYZhOt3DumqYFL/ireLVhFUw3CgQfDSZFVlo67a0ZJRAp88y?= =?us-ascii?Q?lqgQv1h8XkjwdOVTYiatsuvXQL4nWEl63FK5Z7uL53H/75S4RhXSNCYo4nAj?= =?us-ascii?Q?UtUwG4f28fUlyxX44C5Xns3Q4KQ+Rque2DVbNfzgJInlJgl0HOEnM3k9+3j8?= =?us-ascii?Q?Or5YxtJy1T/qmNqVmdjdl95aetaSvNDYiav0L694ceMyvkMQWb7TokfpHX6w?= =?us-ascii?Q?OtO6ci/9q6Hyl7+utd5ET4Ea/0RYSMcd4wWfY2PLhNH+StzcRGPEYLMcKK85?= =?us-ascii?Q?p2pl4BJHsffVv2CVjgUT8tJWY77OvvXb2m/6NylYGcbTZsslJoseFwhej2zw?= =?us-ascii?Q?FWZiMySnI6hzeCmRXWGf3sSFJyWwC58/sfmG2Iy/0AKqSLJjPmCYTSUHz381?= =?us-ascii?Q?hv8/4WMyz89ZvEgyI5B9utXFTBcSEikelFyRy7tS6mwz/GaFxXkiQW4PV0ys?= =?us-ascii?Q?tl6efYTBaS959tKSM9OJ6aP1YN168nHTDZUkYnrEBjm/h69QF6zFMum0oJX2?= =?us-ascii?Q?VjsS5ExGV3zQ7hoZ8XeVvxY9dazMh+DhYWVUiy3HkYCzoOExInwIrapsGxgG?= =?us-ascii?Q?H1Ad4Fc1LD0PwLI/N+sIVce65C/QOnIh9n6+wvg+scrk7uIMI6AogIlgSJK0?= =?us-ascii?Q?OYeH6eWF0ByFMlHdDtH8EjMBav0/9hBawKZM0gZdIcEcbzZa6cm8bwiZDh42?= =?us-ascii?Q?r5xNljevWeLJje5biuO5qda7RGL8YbsY8+U18iN8zUNM9QhKiif0h6qKBKBk?= =?us-ascii?Q?IP79o6fyo5TnDeiFKGPrGlYHSN1nkfTCxOX//LFdKhDrFH1SixahMl1iuk65?= =?us-ascii?Q?pMVY4CPcQ69XIC4Eq4OHVV8JG7ld0QejUnqb4QB59YYmtle2sBtVLXGRrPi5?= =?us-ascii?Q?huXLXoi42TgDWHdKeWVxACvBkabW7wn1iPxMPV3LnjNU8VHS1gGY6SoW/628?= =?us-ascii?Q?YeBJ+0HYFKoz93dLX1QsCUM=3D?= Content-Type: multipart/alternative; boundary="_000_MW5PR11MB5908F1AEFCFECF962A63B0E4A9D2AMW5PR11MB5908namp_" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW5PR11MB5908.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4148013-b97e-4d84-c71c-08dbcbc413c2 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Oct 2023 08:12:00.8021 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: utlTBhrUNsAzdGB1MjL3rL3Yatf44xIyMOIVzFyx84U61a3oq5qxpe+R1vjzIL2X/N0I7c5ppStXDPLPG2tzCg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB7496 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,HTML_MESSAGE,KAM_SHORT,SPF_HELO_NONE,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 List-Id: --_000_MW5PR11MB5908F1AEFCFECF962A63B0E4A9D2AMW5PR11MB5908namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Committed, thanks Juzhe. Pan From: juzhe.zhong@rivai.ai Sent: Friday, October 13, 2023 4:08 PM To: Li, Pan2 ; gcc-patches Cc: Li, Pan2 ; Wang, Yanzhang ;= kito.cheng Subject: Re: [PATCH v1] RISC-V: Add test for FP iceil auto vectorization Ok ________________________________ juzhe.zhong@rivai.ai From: pan2.li Date: 2023-10-13 16:06 To: gcc-patches CC: juzhe.zhong; pan2.li; yanzhang.wang; kito.cheng Subject: [PATCH v1] RISC-V: Add test for FP iceil auto vectorization From: Pan Li > The below FP API are supported already by sharing the same standard name, as well as the machine mode. int iceil (float); This patch would like to add the test cases for ensuring the correctness. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/unop/math-iceil-0.c: New test. * gcc.target/riscv/rvv/autovec/unop/math-iceil-run-0.c: New test. * gcc.target/riscv/rvv/autovec/vls/math-iceil-0.c: New test. Signed-off-by: Pan Li > --- .../riscv/rvv/autovec/unop/math-iceil-0.c | 19 ++++++ .../riscv/rvv/autovec/unop/math-iceil-run-0.c | 63 +++++++++++++++++++ .../riscv/rvv/autovec/vls/math-iceil-0.c | 30 +++++++++ 3 files changed, 112 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ice= il-0.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-ice= il-run-0.c create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-icei= l-0.c diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-iceil-0.c= b/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-iceil-0.c new file mode 100644 index 00000000000..2d4a1d163d1 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-iceil-0.c @@ -0,0 +1,19 @@ +/* { dg-do compile } */ +/* { dg-options "-march=3Drv64gcv -mabi=3Dlp64d -O3 -ftree-vectorize -fno-= vect-cost-model -ffast-math -fno-schedule-insns -fno-schedule-insns2" } */ +/* { dg-final { check-function-bodies "**" "" } } */ + +#include "test-math.h" + +/* +** test_float_int___builtin_iceilf: +** frrm\s+[atx][0-9]+ +** ... +** fsrmi\s+3 +** ... +** vsetvli\s+[atx][0-9]+,\s*zero,\s*e32,\s*m1,\s*ta,\s*ma +** vfcvt\.x\.f\.v\s+v[0-9]+,\s*v[0-9]+ +** ... +** fsrm\s+[atx][0-9]+ +** ret +*/ +TEST_UNARY_CALL_CVT (float, int, __builtin_iceilf) diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-iceil-run= -0.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-iceil-run-0.c new file mode 100644 index 00000000000..714173a7f8b --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/unop/math-iceil-run-0.c @@ -0,0 +1,63 @@ +/* { dg-do run { target { riscv_v } } } */ +/* { dg-additional-options "-std=3Dc99 -O3 -ftree-vectorize -fno-vect-cost= -model -ffast-math" } */ + +#include "test-math.h" + +#define ARRAY_SIZE 128 + +float in[ARRAY_SIZE]; +int out[ARRAY_SIZE]; +int ref[ARRAY_SIZE]; + +TEST_UNARY_CALL_CVT (float, int, __builtin_iceilf) +TEST_ASSERT (int) + +TEST_INIT_CVT (float, 1.2, int, __builtin_iceilf (1.2), 1) +TEST_INIT_CVT (float, -1.2, int, __builtin_iceilf (-1.2), 2) +TEST_INIT_CVT (float, 0.5, int, __builtin_iceilf (0.5), 3) +TEST_INIT_CVT (float, -0.5, int, __builtin_iceilf (-0.5), 4) +TEST_INIT_CVT (float, 0.1, int, __builtin_iceilf (0.1), 5) +TEST_INIT_CVT (float, -0.1, int, __builtin_iceilf (-0.1), 6) +TEST_INIT_CVT (float, 3.0, int, __builtin_iceilf (3.0), 7) +TEST_INIT_CVT (float, -3.0, int, __builtin_iceilf (-3.0), 8) +TEST_INIT_CVT (float, 8388607.5, int, __builtin_iceilf (8388607.5), 9) +TEST_INIT_CVT (float, 8388609.0, int, __builtin_iceilf (8388609.0), 10) +TEST_INIT_CVT (float, -8388607.5, int, __builtin_iceilf (-8388607.5), 11) +TEST_INIT_CVT (float, -8388609.0, int, __builtin_iceilf (-8388609.0), 12) +TEST_INIT_CVT (float, 0.0, int, __builtin_iceilf (-0.0), 13) +TEST_INIT_CVT (float, -0.0, int, __builtin_iceilf (-0.0), 14) +TEST_INIT_CVT (float, 2147483520.0, int, __builtin_iceilf (2147483520.0), = 15) +TEST_INIT_CVT (float, 2147483648.0, int, 0x7fffffff, 16) +TEST_INIT_CVT (float, -2147483648.0, int, __builtin_iceilf (-2147483648.0)= , 17) +TEST_INIT_CVT (float, -2147483904.0, int, 0x80000000, 18) +TEST_INIT_CVT (float, __builtin_inf (), int, __builtin_iceilf (__builtin_i= nff ()), 19) +TEST_INIT_CVT (float, -__builtin_inf (), int, __builtin_iceilf (-__builtin= _inff ()), 20) +TEST_INIT_CVT (float, __builtin_nanf (""), int, 0x7fffffff, 21) + +int +main () +{ + RUN_TEST_CVT (float, int, 1, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 2, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 3, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 4, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 5, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 6, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 7, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 8, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 9, __builtin_iceilf, in, out, ref, ARRAY_SIZE); + RUN_TEST_CVT (float, int, 10, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 11, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 12, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 13, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 14, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 15, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 16, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 17, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 18, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 19, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 20, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + RUN_TEST_CVT (float, int, 21, __builtin_iceilf, in, out, ref, ARRAY_SIZE= ); + + return 0; +} diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-iceil-0.c = b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-iceil-0.c new file mode 100644 index 00000000000..f8877a1d564 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vls/math-iceil-0.c @@ -0,0 +1,30 @@ +/* { dg-do compile } */ +/* { dg-options "-march=3Drv64gcv_zvl4096b -mabi=3Dlp64d -O3 --param=3Dris= cv-autovec-lmul=3Dm8 -ffast-math -fdump-tree-optimized" } */ + +#include "def.h" + +DEF_OP_V_CVT (iceilf, 1, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 2, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 4, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 8, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 16, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 32, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 64, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 128, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 256, float, int, __builtin_iceilf) +DEF_OP_V_CVT (iceilf, 512, float, int, __builtin_iceilf) + +/* { dg-final { scan-assembler-not {csrr} } } */ +/* { dg-final { scan-tree-dump-not "1,1" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "2,2" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "4,4" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "16,16" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "32,32" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "64,64" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "128,128" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "256,256" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "512,512" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "1024,1024" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "2048,2048" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "4096,4096" "optimized" } } */ +/* { dg-final { scan-assembler-times {vfcvt\.x\.f\.v\s+v[0-9]+,\s*v[0-9]+}= 9 } } */ -- 2.34.1 --_000_MW5PR11MB5908F1AEFCFECF962A63B0E4A9D2AMW5PR11MB5908namp_--