From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8021 invoked by alias); 21 Aug 2010 04:10:43 -0000 Received: (qmail 7992 invoked by uid 48); 21 Aug 2010 04:10:31 -0000 Date: Sat, 21 Aug 2010 04:10:00 -0000 Message-ID: <20100821041031.7991.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/45365] X86 FP add and multiply aren't commutative In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "hjl dot tools at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-08/txt/msg01708.txt.bz2 ------- Comment #3 from hjl dot tools at gmail dot com 2010-08-21 04:10 ------- (In reply to comment #2) > How are they are not commutative with respect of the NaNs? Is it only when > both are operands are NaNs, it causes an issue? > > > If I read your testcase correctly, x87 and SSE both don't do IEEE FP correctly > with respect of NaNs. For multiply and add if either operand is a NaN, the > result is also a NaN IIRC. The difference is QNaN and SNaN. They are both NaNs, but not the same. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45365