From owner-freebsd-testing@freebsd.org Tue Jul 25 21:00:32 2017 Return-Path: Delivered-To: freebsd-testing@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8295CD7E3C6 for ; Tue, 25 Jul 2017 21:00:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57F0266B5B for ; Tue, 25 Jul 2017 21:00:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v6PL0VXp028248 for ; Tue, 25 Jul 2017 21:00:32 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-testing@freebsd.org Subject: [Bug 220989] lib/msun/trig_test fails with clang 5.0+ Date: Tue, 25 Jul 2017 21:00:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: tests X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dim@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: dim@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jul 2017 21:00:32 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220989 Dimitry Andric changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|freebsd-testing@freebsd.org |dim@FreeBSD.org CC| |davide@FreeBSD.org, | |emaste@freebsd.org --- Comment #3 from Dimitry Andric --- I tried adding a bit of debug info, and with a "good" libm, the first result is: DBG: ld_pi_odd[0] =3D 1.18918869603738415962e+101, sinl() =3D 2.47267281071058784804e-22, fabsl() =3D 2.47267281071058784804e-22, LDBL_EPSILON =3D 1.08420217248550443401e-19 With a "bad" libm (compiled by clang 5.0.0), it becomes: DBG: ld_pi_odd[0] =3D 1.18918869603738415962e+101, sinl() =3D 6.81892800593498228635e-01, fabsl() =3D 6.81892800593498228635e-01, LDBL_EPSILON =3D 1.08420217248550443401e-19 E.g. the sinl() result is completely off. I did some bisection, and it see= ms to have regressed with this upstream commit: https://reviews.llvm.org/rL307529 ("This patch completely replaces the scheduling information for the SandyBridge architecture target by modifying the file X86SchedSandyBridge.td located under the X86 Target") I am not entirely sure why such a commit would influence the operation of e= .g. sinl() on generic amd64, since it does not use any Sandy Bridge specific assembly or the like. Maybe it exposes some other bug in the X86 code generation for long doubles? Or maybe there is some sort of undefined beha= vior in our sinl() implementation that is now being over-optimized? The challenge here is to come up with a good minimized test case for upstre= am, so we can submit this as a concrete bug. Maybe it is easiest to just copy paste all of the sinl() implementation plus the relevant part of trig_test.c into one big .c file, and make it print and/or check the end result. --=20 You are receiving this mail because: You are the assignee for the bug.=