From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 588F83858035 for ; Thu, 9 Nov 2023 11:36:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 588F83858035 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 588F83858035 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.220.29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699529787; cv=none; b=kKQYOD72KIDOknrX4qI7onLG/iJR7XHd2MdMOA/TBSkhe7znB6uc1A63VjEI0wmsKKqX4/6AobSNRNJQktvjBZsgGfc6Ql7qft90ZLBj/swGlw8nZh6radqcPbT+ndxGtAvTO4wA92G2f3X60ZP2/HqJDsee7llxeJI4Frjx7GE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699529787; c=relaxed/simple; bh=Pio8gBQXOm5tdYU4TQZB42n9gFSkQYnF/REQ9yoixUY=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:MIME-Version; b=mi+m9YHvC7mMlZIB6h3X9WqUU5CARbi9FS4rqKOtKyZuwvD1jLDRZeXMZtcU9vrme4SnV7ukCMtJFJuFGa7ltHgqIFY8DVxOpYC+m3VM2WMqeJAD/0TNC8rjqnae7Npex/in4dOAyLnCoExw0ogFXzsCrrSEhcqR09qkCTBj5dI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 7C46F1F8AB for ; Thu, 9 Nov 2023 11:36:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1699529784; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=nDl9nGkVyu70kseMfNaqiI6govg/Cbi4cEXAwn+uOW8=; b=kUrR7av2J7dNtj3kgnMI5ex3Z90FCTGNCN3A6ts/mbZJBk9jLuVrvwe6YMEdU1s880+ftC wK8nOx+/k6BdV4f5dkz7PVgSQLqIDFnxvDjlw4rKl+cXqqBsY8xaQmQ/B+SlDMYibakz0e utC4tNDL/v/ER4j/BeoGJruVEl2xRkg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1699529784; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=nDl9nGkVyu70kseMfNaqiI6govg/Cbi4cEXAwn+uOW8=; b=piNRjo4QUnuwQv5hZ1wHHvo9BOzCQPKU0zHx9Co/DzBwhIOmWt8u+hxSuGGq3idvcOmFkX 0wg0JCiySFXTgxCg== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 515D12C608 for ; Thu, 9 Nov 2023 11:36:24 +0000 (UTC) Date: Thu, 9 Nov 2023 11:36:24 +0000 (UTC) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] tree-optimization/112450 - avoid AVX512 style masking for BImode masks User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,MISSING_MID,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Message-ID: <20231109113624.STl448gsmeJkZcxjhtCI9HKr9RaLgLpXBZwD0jH_cgQ@z> The following avoids running into the AVX512 style masking code for RVV which would theoretically be able to handle it if I were not relying on integer mode maskness in vect_get_loop_mask. While that's easy to fix (patch in PR), the preference is to not have AVX512 style masking for RVV, thus the following. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-loop.cc (vect_verify_full_masking_avx512): Check we have integer mode masks as required by vect_get_loop_mask. --- gcc/tree-vect-loop.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index a544bc9b059..8abc1937d74 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -1462,7 +1462,10 @@ vect_verify_full_masking_avx512 (loop_vec_info loop_vinfo) if (!mask_type) continue; - if (TYPE_PRECISION (TREE_TYPE (mask_type)) != 1) + /* For now vect_get_loop_mask only supports integer mode masks + when we need to split it. */ + if (GET_MODE_CLASS (TYPE_MODE (mask_type)) != MODE_INT + || TYPE_PRECISION (TREE_TYPE (mask_type)) != 1) { ok = false; break; -- 2.35.3