From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 46F5B385DC2E; Wed, 26 Aug 2020 11:17:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 46F5B385DC2E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1598440654; bh=P57neo72qqUAPlJ/nJJAUM+sZOhq+rm23ebq9DpWLrQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZMRskkSPJpPerzB4310q938m8h7Sn3CJwlc5CJg0g1+PVT9NOES7j1PYFqbw24fMN JvgfylEEcB5FXuvyAiXZ2tq76/NCPRdX+BY2r1i/72tRSfif09Lx0WHW42F+V1YEIW cRHaLX/cNgkaQ2XbIqecABlw42pXy8VrhyNSiD9U= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96793] __builtin_floor produces wrong result when rounding direction is FE_DOWNWARD Date: Wed, 26 Aug 2020 11:17:34 +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: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned 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: Wed, 26 Aug 2020 11:17:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96793 --- Comment #6 from Uro=C5=A1 Bizjak --- Ehm... 2006-10-29 Richard Guenther * config/i386/i386-protos.h (ix86_expand_floorceil): Declare. (ix86_expand_floorceildf_32): Likewise. * config/i386/i386.c (ix86_expand_sse_compare_mask): New static helper function. (ix86_expand_floorceil): Expander for floor and ceil to SSE math. (ix86_expand_floorceildf_32): Same for DFmode on 32bit archs. * config/i386/i386.md (floordf2): Adjust to enable floor expansion via ix86_expand_floorceil if TARGET_SSE_MATH and -fno-trapping-math is enabled and if not optimizing for size. (floorsf2, ceildf2, ceilsf2): Likewise. * config/i386/sse.md (sse_maskcmpsf3): New insn. (sse2_maskcmpdf3): Likewise.=