From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by sourceware.org (Postfix) with ESMTPS id 2D3A53858D35 for ; Thu, 29 Jun 2023 04:18:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D3A53858D35 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=1688012317; x=1719548317; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=MOVRf9KUPqFTwtCCmjqmMALsunS0JwVHnVritsWiXl4=; b=ay+9qYlJsADXeDb/qR1GfhzgFX2CSR9syUVyTB5SMeyGzDqsCkZY8rwu pnJBTad4/b0hcIDA31SIuBs8N1/2pYPHWMnQYkG5irPtGJNKk1/Jz8SIP PIdThnN6uzCiZFkjnQzlDkl9KR/fp+bTesgyGgkSmHrWKhEiEtnmnwQmW L4RQnDXgH0nOEGpy+Y1HklwyzOjbAr/WPtQ5+rHGtoVIGN0BpsqFZEWWK sBALPnyprq2NeYjwDtZj5k/Jlkf7IU75ZP3XsU+5Wv8l+Xg8QrDMkxZ9W gSyexa0Ndx1pX7mV8e8rTzV+1kYxZfJmtUDU/CAaGJYnuD8vlCCM5++fU A==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="448401898" X-IronPort-AV: E=Sophos;i="6.01,167,1684825200"; d="scan'208";a="448401898" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 21:18:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="694488892" X-IronPort-AV: E=Sophos;i="6.01,167,1684825200"; d="scan'208";a="694488892" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga006.jf.intel.com with ESMTP; 28 Jun 2023 21:18:35 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 28 Jun 2023 21:18:34 -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.27 via Frontend Transport; Wed, 28 Jun 2023 21:18:34 -0700 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (104.47.51.47) 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.27; Wed, 28 Jun 2023 21:18:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VgWRF+Fwia5XD+ZbhHBCfJMMB3qcAZBxLBhHw556Y01GyNHf2miQ097JWSjUtFkHrhmHzFpQwXJ7vTGFXLI/2TkkTskifxXXKCZJE+4b2Fahb5exhc9VySb1Hj6yPwz9kQtq97zpYfwU2A3IaAzuMtkxVmbDaeEUGCCVDAoePx3gmhqFbTrBgE11y/02/2hCYdDRDy9XMU2o2oINN8+VP65VPwZhdJNfEfDLUEidsaGO4FcNVUgG67zPJWODq3p83A0amDg1pT3V4R32d/qrDc4wpti+oikx8Hz0nvpCMLUYXhdA7Np2xGVCXA2sHJvPOQ00vd/386UqIsqVebMixw== 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=2FsAUsMTQ2N1o4hNYGQ+gTTpmHhlVuWNJgYFfHugJWg=; b=PzwoR+re4qmzupjIOPy0gB3Jn1eVvTmQZvxekcNyVKLG9Ombw/JzYAKhP50BKjBKr6VGpGGpS/0O6PiEfGjNzybKHvifBN9+rtXnvC9SAO4+eAtsQtOsu4nlEzDn/gIq9EKwoOmefzKkyB0oNiZQ7x0SeO7UDDf4ES4a1qmzCxZ6g3y3Z7JHrasWKUi1Jj6+dGuN58reEBqeoB785QJ/h1GtMkocIrsXoDDR9SUhBOmpvIeNTqf7Mk+5utP6HspcxmalsmXX/EuIf2Lm7uWfirl0TI51lXdVnabV0cNSqgVptX/tv7hoApBG/dBUrO/eg8mkQwv1l66IPAI9++2Dug== 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 DM6PR11MB4740.namprd11.prod.outlook.com (2603:10b6:5:2ad::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Thu, 29 Jun 2023 04:18:32 +0000 Received: from MW5PR11MB5908.namprd11.prod.outlook.com ([fe80::127c:f4cc:e699:8f73]) by MW5PR11MB5908.namprd11.prod.outlook.com ([fe80::127c:f4cc:e699:8f73%6]) with mapi id 15.20.6521.023; Thu, 29 Jun 2023 04:18:32 +0000 From: "Li, Pan2" To: Jakub Jelinek , Richard Biener CC: "gcc-patches@gcc.gnu.org" , "jeffreyalaw@gmail.com" , "kito.cheng@gmail.com" , "juzhe.zhong@rivai.ai" , "rdapp.gcc@gmail.com" Subject: RE: [PATCH] Prevent TYPE_PRECISION on VECTOR_TYPEs Thread-Topic: [PATCH] Prevent TYPE_PRECISION on VECTOR_TYPEs Thread-Index: AQHZqNw1+W9cFVmQ9UecyHPLR/7Pp6+eZvCAgALC6jCAAAVyUA== Date: Thu, 29 Jun 2023 04:18:32 +0000 Message-ID: References: <20230627094533.C82C713462@imap2.suse-dmz.suse.de> In-Reply-To: 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_|DM6PR11MB4740:EE_ x-ms-office365-filtering-correlation-id: 3063c1a8-6f59-4a38-018b-08db7857e62d x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: TLC4meDTiWyG6Dnw3a/BBovIhVA3PCNghL0VtVqWvUqtQ3kzKh3ly8acu9lBW8DTUEp120aBaHl5EfK73LWss9dpZBreLFnVgvHGctFrqdq+3eW4H7mOjChC8HyV9fxEeop2K6wwHyIWD5iyQjC7YLV6L5mlPAb5xXKWcRsx/g+osB1hDEzrqRxpFyx5W7GazB5/OC8JNDk3uPS8tUlOgk6/deRlXD+SV/o5R3/sXIDRr38rLJksffUKo7TZCzsIZbGwnGb1r3jpK2jQlXftMQqjzFT5TWQHfgH4anECfczBd1k98x2+VoH63Wl3Jzs2cXcg9WzQOaQsZ06l9On3dErOs1b/x30782794Q+YZecxsuu+KFbwULXcU2BpasfKcwX6O3bHk7jjZ4UyvTRa2/8v5thUv2vNKiocf8rK1NwcjMOSZXI6dn9DqYuqzjgmRjNEXjQxu+GLFO7assWpwdZGccfXjT7u7HJRKo81BHYH9qapRR0GWRHAssE7kxl9oB05Fan9tdBC7r/P9rSo/XAXGMpsZK6sPIS3bnnGLesNWo1dJQyAi0igABA0JAsaS00zMZNK5B+qLWKVp+hBuGtXXzLdjGi8G1DwaazeLvU= 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:(13230028)(366004)(39860400002)(396003)(136003)(346002)(376002)(451199021)(66556008)(53546011)(6506007)(122000001)(66476007)(76116006)(52536014)(33656002)(86362001)(5660300002)(64756008)(316002)(4326008)(66446008)(41300700001)(38100700002)(8936002)(55016003)(38070700005)(66946007)(82960400001)(8676002)(2906002)(2940100002)(7696005)(9686003)(478600001)(186003)(26005)(71200400001)(83380400001)(110136005)(54906003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gwTOsStd2//yCFoheNyWfixwp6HqzGCduVaSqUgDnZQd2bzc1/eOo5tykM77?= =?us-ascii?Q?Y11Ys93IQ1me5yQEZVvWFhRceAZuN8S/6p9ff7IyKzdLpmvyEkXzsCObIW1p?= =?us-ascii?Q?G9yvBHzkQXj5xc4r/ckjizwjeLbUJJVY+G6ZkrSb1PAqtAceAWRyRTROtKw6?= =?us-ascii?Q?9lA7GXqFRgF9aLtQp4NcFwCHHAeKcM9m8okAfGSvvNoHHM8cJ8cYg8YpKu21?= =?us-ascii?Q?Ir1Nyyf9WJkSrUYRdjAN4MJhDSD9bW2zZOWPXgbRAv2vfSthSdqng688Wnyv?= =?us-ascii?Q?f6WN39WvTRXSovvRPhSDJz/TOjmm0CXKgHt3iQkLoOU/5Zuzr0Td85nthWDW?= =?us-ascii?Q?OUvo8W9zq1Bqhlv3fCPm5kXzW/sJTFZEVBiJfrGg6W+4mhxqwXmsA3f5uWmB?= =?us-ascii?Q?yZMbVgoHNIP4U1v4MfyVaHK3MhrwEMqBN2d5BiAODm04OkvdU+yW0BNQbOB2?= =?us-ascii?Q?Kmh76fIq0M7uUCsAeTaUl8tnkwiabBijed7vz7LOWJm1Ey3ijGgXHozqU11d?= =?us-ascii?Q?LrsBM2/vNcNCIbfvQzoTJyxxg+pjWmjz7wTJSnl/6DnmCf6k1TYAp1BzXvBt?= =?us-ascii?Q?uJ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=?us-ascii?Q?TPHv5k5i2cBwXCelUhmOoUGJKU4TJskIT3841ePvZ72D0tY6VJrbxcVo5Cen?= =?us-ascii?Q?jq466OLWj1yXXmRFrIo=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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: 3063c1a8-6f59-4a38-018b-08db7857e62d X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jun 2023 04:18:32.2057 (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: 0EQnc/Iv8fGjSsjJ+uHwh90VFoJ5z9sS5LYK0eSTgZxF6RBoW+eG4zNt428bXXiXJfNMwlEmn7VeNaNWulW1aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4740 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE,WEIRD_PORT 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: Sorry for disturbing, cc kito, juzhe and robin for awareness. Pan -----Original Message----- From: Li, Pan2=20 Sent: Thursday, June 29, 2023 12:05 PM To: Jakub Jelinek ; Richard Biener Cc: gcc-patches@gcc.gnu.org; jeffreyalaw@gmail.com Subject: RE: [PATCH] Prevent TYPE_PRECISION on VECTOR_TYPEs It seems this patch may result in many test ICE failures on RISC-V backend.= Could you help to double confirm about it follow the possible reproduce st= eps like blow? Thank you! cd gcc && mkdir __BUILD__ && cd __BUILD__ ../configure \ --target=3Driscv64-unknown-elf \ --prefix=3D \ --disable-shared \ --enable-threads \ --enable-tls \ --enable-languages=3Dc,c++ \ --with-system-zlib \ --with-newlib \ --disable-libmudflap \ --disable-libssp \ --disable-libquadmath \ --disable-libgomp \ --enable-nls \ --disable-tm-clone-registry \ --enable-multilib \ --src=3D`pwd`/../ \ --with-abi=3Dlp64d \ --with-arch=3Drv64imafdcv \ --with-tune=3Drocket \ --with-isa-spec=3D20191213 \ --enable-werror \ --enable-bootstrap \ CFLAGS_FOR_BUILD=3D"-O0 -g" \ CXXFLAGS_FOR_BUILD=3D"-O0 -g" \ CFLAGS_FOR_TARGET=3D"-O0 -g" \ CXXFLAGS_FOR_TARGET=3D"-O0 -g" \ BOOT_CFLAGS=3D"-O0 -g" \ CFLAGS=3D"-O0 -g" \ CXXFLAGS=3D"-O0 -g" \ GM2FLAGS_FOR_TARGET=3D"-O0 -g" \ GOCFLAGS_FOR_TARGET=3D"-O0 -g" \ GDCFLAGS_FOR_TARGET=3D"-O0 -g" make -j $(nproc) all-gcc && make install-gcc Then run one test file build like below, and you may see the ICE similar to= below. ../__RISC-V_INSTALL_/bin/riscv64-unknown-elf-gcc -O2 --param riscv-autovec-= preference=3Dfixed-vlmax gcc/testsuite/gcc.target/riscv/rvv/autovec/partial= /multiple_rgroup_run-3.c during GIMPLE pass: widening_mul In file included from gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/mu= ltiple_rgroup_run-3.c:4: gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/multiple_rgroup-3.c: In = function 'f3_init': gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/multiple_rgroup-3.c:249:= 1: internal compiler error: tree check: expected none of vector_type, have = vector_type in divmod_candidate_p, at tree-ssa-math-opts.cc:4998 249 | f3_init (int8_t *__restrict x, int8_t *__restrict x2, int64_t *__re= strict y, | ^~~~~~~ 0x1b1584e tree_not_check_failed(tree_node const*, char const*, int, char co= nst*, ...) /home/pli/repos/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/..= /gcc/tree.cc:8936 0xd74e9e tree_not_check(tree_node*, char const*, int, char const*, tree_cod= e) /home/pli/repos/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/..= /gcc/tree.h:3581 0x196150c divmod_candidate_p /home/pli/repos/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/..= /gcc/tree-ssa-math-opts.cc:4998 0x196164f convert_to_divmod /home/pli/repos/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/..= /gcc/tree-ssa-math-opts.cc:5041 0x196383d after_dom_children /home/pli/repos/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/..= /gcc/tree-ssa-math-opts.cc:5580 0x299bcb4 dom_walker::walk(basic_block_def*) /home/pli/repos/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/..= /gcc/domwalk.cc:354 0x1963d09 execute /home/pli/repos/gcc/444/riscv-gnu-toolchain/gcc/__RISC-V_BUILD__/..= /gcc/tree-ssa-math-opts.cc:5666 Please submit a full bug report, with preprocessed source (by using -frepor= t-bug). Please include the complete backtrace with any bug report. See for instructions. Pan -----Original Message----- From: Gcc-patches On = Behalf Of Jakub Jelinek via Gcc-patches Sent: Tuesday, June 27, 2023 5:47 PM To: Richard Biener Cc: gcc-patches@gcc.gnu.org; jeffreyalaw@gmail.com Subject: Re: [PATCH] Prevent TYPE_PRECISION on VECTOR_TYPEs On Tue, Jun 27, 2023 at 11:45:33AM +0200, Richard Biener wrote: > The following makes sure that using TYPE_PRECISION on VECTOR_TYPE > ICEs when tree checking is enabled. This should avoid wrong-code > in cases like PR110182 and instead ICE. >=20 > It also introduces a TYPE_PRECISION_RAW accessor and adjusts > places I found that are eligible to use that. >=20 > Bootstrapped and tested on x86_64-unknown-linux-gnu with all > languages enabled. >=20 > OK for trunk? There is definitely going to be fallout but it > should be straight-forward to fix with quick fixes using > TYPE_PRECISION_RAW possible. >=20 > Thanks, > Richard. >=20 > * tree.h (TYPE_PRECISION): Check for non-VECTOR_TYPE. > (TYPE_PRECISION_RAW): Provide raw access to the precision > field. > * tree.cc (verify_type_variant): Compare TYPE_PRECISION_RAW. > (gimple_canonical_types_compatible_p): Likewise. > * tree-streamer-out.cc (pack_ts_type_common_value_fields): > Stream TYPE_PRECISION_RAW. > * tree-streamer-in.cc (unpack_ts_type_common_value_fields): > Likewise. > * lto-streamer-out.cc (hash_tree): Hash TYPE_PRECISION_RAW. >=20 > gcc/lto/ > * lto-common.cc (compare_tree_sccs_1): Use TYPE_PRECISION_RAW. LGTM. Jakub