From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) by sourceware.org (Postfix) with ESMTPS id 5A21D3858C53 for ; Thu, 28 Dec 2023 16:39:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5A21D3858C53 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5A21D3858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703781550; cv=none; b=f1XIG28BPd+d0ChsNmhtARA8Sy+Q5KhXSy+p4SQXv9tgzE9cKkOAjPNtsb4UFSISKLL4TB2HunYbbXtH0tT8Up6Zr6EI1m2vYNbiXWxIeYZYEadz3Jfxp73jOexVl2IjEWrW61EomoDOGzCopnM+EJAlcyQsWy5R10Zv9Ymj67c= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703781550; c=relaxed/simple; bh=BAIbQ2p+8WtuTpY8p8xUaqSv6nta++lrASvSKCczpRs=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=GPAOID6hTn5/FrjGGiqW4kp9UDUH2yUSzsetbe2KV/n3k4tviD+0/iOwiWE1ZwSZUcqEU2e3fJc60VirQP78k11TxUFC9+19XOln2PvylujBsSuh1mYu3Q/VbSMkBuwPhbrCy1A931kUl9Jli/DfjCuuIESAZ2R66QmQgKDitJQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2a.google.com with SMTP id ca18e2360f4ac-7bb2c2f00bfso40800339f.2 for ; Thu, 28 Dec 2023 08:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703781547; x=1704386347; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=M9WgvRFaFfVy8h4P88KKDvJKDYsYkS0nzU7TzYIQGw4=; b=Ekkn8z6bLhKspYJavht8wAJaJlwCbkEhz3407dokoBp8YHxn2NsnybYypinUpcNfkg wJ7kveO0OPep+GlSco6i2eszoC6bFIh4XabHktWO3ncWzYCyz8PRdquuHz4hwMn1Nj8V uEFJ5y0sw2TTV94Dc7Uphuo9LTIRzkiYevaqIzOo0kRadvnIwfd0BDSIU42B+uN1MrIR RVWMXu0koA7JR9kQZDqopiNWOmCtj3zmaeQW7a2w98p6ivVhMeKoNHTUS5D+X8UQIsmn eG0/Bq92LzCXiPaj++/z/jHRKSyBfoL+WRQP2RG2lITADyQHz2wkErFyT2dImc2Ste7f Qnjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703781547; x=1704386347; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=M9WgvRFaFfVy8h4P88KKDvJKDYsYkS0nzU7TzYIQGw4=; b=AmAxAvmT+hu2cn90hpSWAANj5SvvsGY9wuKIfL0SRF683KpBmxxMGi0lxYV5pO4nlS oRWVG6zZiG1RLZkNE7/+yBDrPnyGn/SHwT7819z9pmqjdZNeQCFFR0ad1kFW4CUw28S5 PzxhWs+7xCwOyGy6nZVt3R0KLt2pNj0To9mJRN2hpTL/zZyWE/+ojdY8a9QGVu9CS3z6 gtToe5cemqCKUDDsjzGyAFnthEe6wt3bqQnDuiRN/Pmhj/tBc1wwiHNDhbmrO2Yksx3e sW4lvAHfPEw7tuu1xxogzDmA5/ptAi90K/amV3U5Dd6kER9WLpAQ8jPz6+6OvAT36+pC smyA== X-Gm-Message-State: AOJu0YxgyZmrS0gJk4EQJA3pTroud8Xgbz1+sVoutBJ0DcS31AT5KGsO gXwZ2hICnHMPH1nzxc2ehhk= X-Google-Smtp-Source: AGHT+IFMt+7e46oi5Bh84NU000lDo8h0+xi879ijFnTtSXZVm7SGxP8NLs2lB5wMbwgJRCgYZFeNuA== X-Received: by 2002:a6b:a18:0:b0:7ba:8daf:7292 with SMTP id z24-20020a6b0a18000000b007ba8daf7292mr9688313ioi.21.1703781547480; Thu, 28 Dec 2023 08:39:07 -0800 (PST) Received: from ?IPV6:2607:fb91:1dfa:8702:b88c:e239:7328:301b? ([2607:fb91:1dfa:8702:b88c:e239:7328:301b]) by smtp.gmail.com with ESMTPSA id 18-20020a5d9c12000000b007ba7e1a64f6sm4287487ioe.1.2023.12.28.08.39.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 28 Dec 2023 08:39:06 -0800 (PST) Message-ID: <782f6b96-d60e-48ef-9f7f-931b9480dcb2@gmail.com> Date: Thu, 28 Dec 2023 09:39:03 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] RISC-V: XFAIL pr30957-1.c when loop vectorized with variable factor Content-Language: en-US To: pan2.li@intel.com, gcc-patches@gcc.gnu.org Cc: juzhe.zhong@rivai.ai, yanzhang.wang@intel.com, kito.cheng@gmail.com, richard.guenther@gmail.com References: <20231223110733.2565292-1-pan2.li@intel.com> <20231226093445.1860961-1-pan2.li@intel.com> From: Jeff Law In-Reply-To: <20231226093445.1860961-1-pan2.li@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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: On 12/26/23 02:34, pan2.li@intel.com wrote: > From: Pan Li > > This patch would like to XFAIL the test case pr30957-1.c for the RVV when > build the elf with some configurations (list at the end of the log) > It will be vectorized during vect_transform_loop with a variable factor. > It won't benefit from unrolling/peeling and mark the loop->unroll as 1. > Of course, it will do nothing during unroll_loops when loop->unroll is 1. > > The aarch64_sve may have the similar issue but it initialize the const > `0.0 / -5.0` in the test file to `+0.0` before pass to the function foo. > Then it will pass the execution test. > > aarch64: > movi v0.2s, #0x0 > stp x29, x30, [sp, #-16]! > mov w0, #0xa > mov x29, sp > bl 400280 <== s0 is +0.0 > > Unfortunately, the riscv initialize the the const `0.0 / -5.0` to the > `-0.0`, and then pass it to the function foo. Of course it the execution > test will fail. > > riscv: > flw fa0,388(gp) # 1299c <__SDATA_BEGIN__+0x4> > addi sp,sp,-16 > li a0,10 > sd ra,8(sp) > jal 101fc <== fa0 is -0.0 > > After this patch the loops vectorized with a variable factor of the RVV > will be treated as XFAIL by the tree dump when riscv_v and > variable_vect_length. > > The below configurations are validated as XFAIL for RV64. Interesting. So I'd actually peel one more layer off this onion. Why do the aarch64 and riscv targets generate different constants (0.0 vs -0.0)? Is it possible that the aarch64 is generating 0.0 when asked for -0.0 and -fno-signed-zeros is in effect? That's a valid thing to do when -fno-signed-zeros is on. Look for HONOR_SIGNED_ZEROs in the aarch64 backend. Jeff