From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by sourceware.org (Postfix) with ESMTPS id 71F463858CD1 for ; Mon, 9 Oct 2023 12:54:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 71F463858CD1 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-536071e79deso9834403a12.1 for ; Mon, 09 Oct 2023 05:54:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696856042; x=1697460842; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=7AxRPmMfhla/jOLbO1lh3D17xUeCK2+3itVmNrjzL6o=; b=RbE5ctbqyqvxXRX4d+Ffva/VH99J8ep5cZfUD9HeKZVYiCDTLL/iDuvWVDkLjQfzZx zyN53qN3JoWXojqm6F/JMBImDTkztJOsRTtCtVtWPAXXC7x1UqNUQ3c+rIOW1BkLfgYi f00kP0osIUcq64RH0Edkx8PD7DdxtBh7F99vIEN0IcSW0MmxxTwgL1sH0/HsNkDebDe3 pCxJkVj28LhqyQTWDq/gyV2cbqf75SB+o7tsR8vrq9Qy+OtVFfIH5YnK6T0fqeEAS0aQ U2cd/y3HReJuD/OQtOcim+UCa9U0CMWkelgc7rxSJHgDtL4Fp/nFiaccv1blpMxahiDS mrdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696856042; x=1697460842; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7AxRPmMfhla/jOLbO1lh3D17xUeCK2+3itVmNrjzL6o=; b=B7FwHZo+xRoa3VY6WUQMioRIXUaMPt8kjywiNGZEBJe1x6JmgBV0Nt8icZq9QGt4JZ I+kdIkgSMQaPLirk8JS2fOqZFqJRZ7+hm83wL/hBPG6CJ+rRsR8Qw3qXkYFHGhWI1g28 iwZaiwqCsJAfrHgqat0g/9NKc8pNoT2rBHxK+sL5iLvfz2e2NPXpEbiWrWnT8rsyVfei 3aDIvpTTnyGY2mgOh//nPHit6/Rsb/BSylsD4oWRNo4Tb9xVPn1qFGKJL1WTiJuINnEx Y8iP7LSM5GtYiKyj3FMijymll9y41rZIw0Zrj8mAGsFMZcW1Zg5U90vhEbJsoyw1NAZ6 RwXg== X-Gm-Message-State: AOJu0YwKBoAUtS+trU/ZxGlnf5pDIbCzN33EFEDupnZInpbHi3xfEv5f eADwUJdg1J5J0NxbKR/Qi0I= X-Google-Smtp-Source: AGHT+IHOPwkHZm6ez9CYQKbIwIr24b3KDdrvwIEOPspGMwXLC1K4DpCMBqZedMKYfK8IqljmNH2tlw== X-Received: by 2002:a05:6402:50d2:b0:530:8fdb:39c8 with SMTP id h18-20020a05640250d200b005308fdb39c8mr10892889edb.15.1696856041840; Mon, 09 Oct 2023 05:54:01 -0700 (PDT) Received: from [192.168.1.23] (ip-046-005-130-086.um12.pools.vodafone-ip.de. [46.5.130.86]) by smtp.gmail.com with ESMTPSA id c11-20020aa7c98b000000b00536ad96f867sm6015633edt.11.2023.10.09.05.54.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Oct 2023 05:54:01 -0700 (PDT) Message-ID: <5fc554a1-fb0c-ebcc-cfae-6b714d3aca38@gmail.com> Date: Mon, 9 Oct 2023 14:54:00 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Cc: rdapp.gcc@gmail.com, Tamar Christina , gcc-patches Subject: Re: [PATCH] ifcvt/vect: Emit COND_ADD for conditional scalar reduction. Content-Language: en-US To: Richard Biener References: <0193b63e-98dc-42bc-cd33-485361ea50bf@gmail.com> <671a575c-02ff-071b-967e-2e93d8986c1a@gmail.com> <85b08273-7eea-be3f-f08a-edf0780d36a7@gmail.com> <187932bd-3a22-acdb-025b-e17ca3408e3a@gmail.com> From: Robin Dapp In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: > Hmm, the function is called at transform time so this shouldn't help > avoiding the ICE. I expected we refuse to vectorize _any_ reduction > when sign dependent rounding is in effect? OTOH maybe sign-dependent > rounding is OK but only when we use a unconditional fold-left > (so a loop mask from fully masking is OK but not an original COND_ADD?). So we currently only disable the use of partial vectors else if (reduction_type == FOLD_LEFT_REDUCTION && reduc_fn == IFN_LAST && FLOAT_TYPE_P (vectype_in) && HONOR_SIGNED_ZEROS (vectype_in) && HONOR_SIGN_DEPENDENT_ROUNDING (vectype_in)) { if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "can't operate on partial vectors because" " signed zeros cannot be preserved.\n"); LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo) = false; which is inside a LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P block. For the fully masked case we continue (and then fail the assertion on aarch64 at transform time). I didn't get why that case is ok, though? We still merge the initial definition with the identity/neutral op (i.e. possibly -0.0) based on the loop mask. Is that different to partial masking? Regards Robin