From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 88C583858C2C; Thu, 28 Apr 2022 03:22:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 88C583858C2C From: "linkw at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/103605] [PowerPC] fmin/fmax should be inlined always with xsmindp/xsmaxdp Date: Thu, 28 Apr 2022 03:22:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: linkw at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: guihaoc at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Apr 2022 03:22:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103605 --- Comment #7 from Kewen Lin --- (In reply to pc from comment #5) > I modified the testcase from comment #3 to clear-before and check-after > FE_INVALID exception bit for each operation: > -- > $ /opt/gcc-nightly/trunk/bin/gcc -O2 -o xsmindp-test xsmindp-test.c > xsmindp.c -lm && ./xsmindp-test a b > (src1, src2): fmin:I b-in:I asm:I > (+3.0, +3.0): +3.0;0 +3.0;0 +3.0;0 > (+3.0, NAN): +3.0;0 +nan;0 +3.0;0 > ( NAN, +3.0): +3.0;0 +3.0;0 +3.0;0 > ( NAN, NAN): +nan;0 +nan;0 +nan;0 > (+3.0, SNAN): +nan;1 +nan;1 +nan;1 > (SNAN, +3.0): +nan;1 +3.0;1 +nan;1 > (SNAN, SNAN): +nan;1 +nan;1 +nan;1 > $ /opt/gcc-nightly/trunk/bin/gcc -O2 -ffast-math -o xsmindp-test > xsmindp-test.c xsmindp.c -lm && ./xsmindp-test a b > (src1, src2): fmin:I b-in:I asm:I > (+3.0, +3.0): +3.0;0 +3.0;0 +3.0;0 > (+3.0, NAN): +nan;0 +nan;0 +3.0;0 > ( NAN, +3.0): +3.0;0 +3.0;0 +3.0;0 > ( NAN, NAN): +nan;0 +nan;0 +nan;0 > (+3.0, SNAN): +nan;1 +nan;1 +nan;1 > (SNAN, +3.0): +3.0;1 +3.0;1 +nan;1 > (SNAN, SNAN): +nan;1 +nan;1 +nan;1 > -- > Without -ffast-math, fmin() matches xsmindp. > With -ffast-math, fmin() matches xsmincdp. Nice test case! We probably can note this matching to xs{min,max}dp as one small "Programming Note" in ISA document.=