From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20000 invoked by alias); 21 Aug 2010 03:59:02 -0000 Received: (qmail 19886 invoked by uid 48); 21 Aug 2010 03:58:52 -0000 Date: Sat, 21 Aug 2010 03:59:00 -0000 Message-ID: <20100821035852.19885.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: "pinskia at gcc dot gnu dot org" 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/msg01707.txt.bz2 ------- Comment #2 from pinskia at gcc dot gnu dot org 2010-08-21 03:58 ------- 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. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45365