public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/45365] New: X86 FP add and multiply aren't commutative
@ 2010-08-21 3:42 hjl dot tools at gmail dot com
2010-08-23 16:30 ` [Bug target/45365] X86 SSE FP add and multiply aren't commutative with 2 NaNs hjl dot tools at gmail dot com
0 siblings, 1 reply; 4+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-21 3:42 UTC (permalink / raw)
To: gcc-bugs
According to table 4-7 in chapter 4, Vol 1 of
IA32/Inte64 SDM, x86 FP add and multiply aren't
commutative with Qnan/Snan inputs. But we have
DEF_RTL_EXPR(PLUS, "plus", "ee", RTX_COMM_ARITH)
DEF_RTL_EXPR(MULT, "mult", "ee", RTX_COMM_ARITH)
That impacts x86 FP plus and mult patterns. Should
we introduce a new target option to disable x86
commutative FP plus and mult?
--
Summary: X86 FP add and multiply aren't commutative
Product: gcc
Version: 4.5.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45365
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug target/45365] X86 SSE FP add and multiply aren't commutative with 2 NaNs
2010-08-21 3:42 [Bug target/45365] New: X86 FP add and multiply aren't commutative hjl dot tools at gmail dot com
@ 2010-08-23 16:30 ` hjl dot tools at gmail dot com
0 siblings, 0 replies; 4+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-08-23 16:30 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-11-26 17:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-45365-4@http.gcc.gnu.org/bugzilla/>
2010-11-14 15:55 ` [Bug target/45365] X86 SSE FP add and multiply aren't commutative with 2 NaNs hjl.tools at gmail dot com
2010-11-14 16:17 ` hjl.tools at gmail dot com
2021-11-26 17:58 ` roger at nextmovesoftware dot com
2010-08-21 3:42 [Bug target/45365] New: X86 FP add and multiply aren't commutative hjl dot tools at gmail dot com
2010-08-23 16:30 ` [Bug target/45365] X86 SSE FP add and multiply aren't commutative with 2 NaNs hjl dot tools at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).