From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 09669385ED4C for ; Tue, 30 Apr 2024 07:38:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 09669385ED4C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 09669385ED4C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714462735; cv=none; b=owzytKiYjfXPYUcoYb8olJM1IYA15BmpQd2HZuI36YA+dcLmT/M2BeILMwJpXV1LEyr3fA5j6XDbiEY7kLEqoW4wQWNZXo/VmicENxYlVoBKywpWy0wkaOrdzsXS+8zA9wmp8GpNdzUVMUe0YKi7FcgQ46TGPWah+Qi9GaHImDA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1714462735; c=relaxed/simple; bh=GpEcX+EDyiAFXOoq5CbXtYGboED90+x2ZAq0Y0H12xE=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=UnddToyQwN+p44poLQH2ieFF2l+SyTRTijN2hYOd2fb7N+TyAwu9p+AIBNhwG1PqAbvfmKdS0RyYkekrF/kyJoD9EPVcNci3MeHAZwf/iunmNBLZj1XcRaJiC5sgFiEWLb2fa7S9olnua8qK7fr2KfRkRiDLoeSz8p293JtsHp0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1714462732; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6qNui/mkzudIdUI8sVcQoWIWE+L+l5jSc2bdgiyAyvs=; b=X+9qoT+WhEyioQ2jjomwxqgQ56fwMia3OzGKl9cs5ujsLnKITKpg/Eeq1iDR0RoNhK9hKF EkWwwhBBV6/B96g3sbB4oBMqjjvCaAXKrOdSrEgBUz+O8DJKIyoJ2wlJxHezOTklJwMFsb vl74CRpCzTaW8nVraMJIoz7ULhxK0KY= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-MleQg00xMUyd3ccrT6y5sg-1; Tue, 30 Apr 2024 03:38:43 -0400 X-MC-Unique: MleQg00xMUyd3ccrT6y5sg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2272E3C0ED46; Tue, 30 Apr 2024 07:38:43 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.45.224.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D8B9C51BF; Tue, 30 Apr 2024 07:38:42 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 43U7cfKZ2788834 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 30 Apr 2024 09:38:41 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 43U7cevT2788833; Tue, 30 Apr 2024 09:38:40 +0200 Date: Tue, 30 Apr 2024 09:38:40 +0200 From: Jakub Jelinek To: Richard Biener Cc: "H.J. Lu" , liuhongt , gcc-patches@gcc.gnu.org, crazylht@gmail.com Subject: Re: [PATCH] Don't assert for IFN_COND_{MIN, MAX} in vect_transform_reduction Message-ID: Reply-To: Jakub Jelinek References: <20240429134515.4140169-1-hongtao.liu@intel.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: On Tue, Apr 30, 2024 at 09:30:00AM +0200, Richard Biener wrote: > On Mon, Apr 29, 2024 at 5:30 PM H.J. Lu wrote: > > > > On Mon, Apr 29, 2024 at 6:47 AM liuhongt wrote: > > > > > > The Fortran standard does not specify what the result of the MAX > > > and MIN intrinsics are if one of the arguments is a NaN. So it > > > should be ok to tranform reduction for IFN_COND_MIN with vectorized > > > COND_MIN and REDUC_MIN. > > > > The commit subject isn't very clear. This patch isn't about "Don't assert > > for IFN_COND_{MIN,MAX}". It allows IFN_COND_{MIN,MAX} in > > vect_transform_reduction. > > Well, we allow it elsewhere, we just fail to enumerate all COND_* we allow > here correctly. > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > > > Ok for trunk and backport to GCC14? > > OK for trunk and branch. Oops, I've just sent the same patch, just with a different testcase (reduced and which tests both the min and max). I think the reduced testcase is better. > > > gcc/ChangeLog: > > > > > > PR 114883 Missing tree-optimization/ > > > * tree-vect-loop.cc (vect_transform_reduction): Don't assert > > > for IFN_COND_{MIN, MAX}. > > > > > > gcc/testsuite/ChangeLog: > > > > > > * gfortran.dg/pr114883.f90: New test. Jakub