This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New insns for the s390 backend (2)


(This is the second attempt, sorry if you get it twice.)

Re:

Due to the fact that between the two operations no rounding takes place the
result maybe different compared to the same calculation performed with
separated muliply and add/sub instructions. That's why the patterns match
only if unsafe math optimization are allowed (e.g. if the --fast-math
optimization flag is present).

The rs6000 port has the TARGET_FUSED_MADD macro that determines when the associated patterns match, triggered by the -mfused-madd and -mno-fused-madd flags. It seems that -mfused-madd is the default, but for the life of me I can't find the code that would verify this.


I bring this up because some people (like me) would like to have fused madd without setting flag_unsafe_math_optimizations; the latter flag allows so much strange floating-point behavior in the name of performance that it does not meet my needs, and by comparison fmadd is a well-behaved and useful addition to my toolkit.

I suggest that the s390 port do something similar.

Brad


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]