From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2939 invoked by alias); 23 Aug 2010 16:30:05 -0000 Received: (qmail 2800 invoked by uid 48); 23 Aug 2010 16:29:52 -0000 Date: Mon, 23 Aug 2010 16:30:00 -0000 Message-ID: <20100823162952.2799.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/45365] X86 SSE FP add and multiply aren't commutative with 2 NaNs 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/msg01869.txt.bz2 ------- Comment #5 from hjl dot tools at gmail dot com 2010-08-23 16:29 ------- ICC people say -- In my opinion, FP multiplication and addition should be considered commutative at both the C and intrinsic level. The only case where the underlying instructions behave in a non-commutative manner is when both operands are NaN. And in that case, even the IEEE-754 floating-point standard does not specify which operand NaN should be returned as the result. The C standard doesn't distinguish between different NaN values at all. If the programmer cares about this very subtle detail in the handling of NaNs, I think inline assembly is the right option. --- Closing as WONTFIX. -- hjl dot tools at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45365