From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by sourceware.org (Postfix) with ESMTPS id 5D38838582B0 for ; Fri, 3 Feb 2023 07:36:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D38838582B0 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-lf1-x132.google.com with SMTP id cf42so6628373lfb.1 for ; Thu, 02 Feb 2023 23:36:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=Qh9w0ou/zDPvXWA+jxIPZr8tEUpMfRO1A0bRvog3Yx8=; b=o3zTNDweYGXf+SS4eKNs2POLbsrtS7KH8/zr7si8Io9bpU7Wo6xnInJCtdJL2lDKAm 9VhDWCAr1U0oPkZVBAzYR7uCDYhTHkkHxSn+ILMWKGxX+iJuaQze6XGv9ci3dwnTbD44 9neQS327NjvKUUK68Vym95qsSWn+cSXPWofgwDMbcqgevoM5vDvpthvaF0k4FH2W7uyV hdibhm23ZRC9lxhVaPI22934Dwt//5AF1jn6gkemlnB3hvs+rcvGjp1uytSXDTTWdVGw +PcnLlYHksQ1tKLVhcqNycu2kyfxt/aAFTYWyTUDlps6xXpBqruKCcIj2Fb0yjDd3iPa Xy9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Qh9w0ou/zDPvXWA+jxIPZr8tEUpMfRO1A0bRvog3Yx8=; b=Y9cuuqy01fHN9NEK0QNT/ckO98FBrFS6B32GlyfpNCFbFrrSxJAB4J0xpWEDpETFcx SOj5V2EfO4ECQzo3q8KWpL9BL26rE0iPZdDgU0qh2ZEE6n1eV/2R4hNPaVjiCmqT6AVD 3IpLRGj+juIoumgFjxP1+Ls02w6j80/5viTeQROxyLP/4CFNOA237tv2+lQovuOomx/0 MOnmRbZWwIHfi1m3EmLXfBsIKniablU09iadiKtIprFvDPX4LGFAsiF8B1t5n90tgRiO il9gB+BaxOkki0001lTQh/OR/XE5KKbWuwTaT+TQI9Ij2ILx8CahSyhmHoqPSWe3JdDP e7TQ== X-Gm-Message-State: AO0yUKWUZW8Dbp8jG32NHKLu3shquEEUCkpelFe5VU0mvlgB6BPMgP4j OFgGS9OKgwoIBJvEFboBWracVWwqNoMUT0Udgbs= X-Google-Smtp-Source: AK7set/2yzCRP6B1tJBE4E7q7bR6hyk5MdGodQ7rNkcT52XZGJFXrrBmq0hH8iWqv2IPBgVPolf2b8fsWRV+PLPciaE= X-Received: by 2002:a05:6512:793:b0:4cc:9fa6:aba7 with SMTP id x19-20020a056512079300b004cc9fa6aba7mr1758734lfr.201.1675409801676; Thu, 02 Feb 2023 23:36:41 -0800 (PST) MIME-Version: 1.0 References: <78f4bcde-74ac-428f-99fe-a6193c52362e@rivosinc.com> In-Reply-To: <78f4bcde-74ac-428f-99fe-a6193c52362e@rivosinc.com> From: Richard Biener Date: Fri, 3 Feb 2023 08:36:29 +0100 Message-ID: Subject: Re: -Ofast/-ffast-math and SPEC 511.pov miscompilation with gcc 13.0 To: Vineet Gupta Cc: gcc@gcc.gnu.org, Aldy Hernandez , Jeff Law , Philipp Tomsich , gnu-toolchain Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no 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 Fri, Feb 3, 2023 at 12:39 AM Vineet Gupta wrote: > > Hi, > > I've noticed SPEC 2017, 511.pov failing for RV64 on bleeding edge gcc. > This is with -Ofast -march=rv64gcv_zba_zbb_zbc_zbs. > Problem also happens with -O3 -ffast-math (and goes away with fast-math > removed) > > I've bisected it to b7fd7fb50111 ("frange: drop endpoints to min/max > representable numbers for -ffinite-math-only") > With that commit evrp is eliding a bunch of if conditions as they > pertain to inf (in code snippet below, it elides code corresponding to > lines 1401-1418 with line 1417 being elided causing the failure). > > I think I know the answer, but just wanted to confirm if that is the > intended behavior given -Ofast / -ffast-math It's the intended behavior of -ffinite-math-only which is part of -Ofast / -ffast-math. There's a CLOSED INVALID bug in bugzilla about the povray failure as well. Richard. > Thx, > -Vineet > > > |New->Angle = __builtin_huge_val(); ||||switch(New->Type) ||{ ||... > ||1246: if(Parse_Camera_Mods(New) == false) ||EXIT ||... ||} ||||1401: > if (New->Up[X] == ||||__builtin_huge_val|()|) { ... } 1417: if > (New->Angle != |||__builtin_huge_val|()) ||{ ||1419: if ((New->Type == > PERSPECTIVE_CAMERA) |||