[LLVMdev] round() vs. rint()/nearbyint() with fast-math

David Tweed david.tweed at arm.com
Fri Jun 21 04:54:20 PDT 2013


| LLVM does not currently have special lowering handling for round(), and
I'll propose a patch to add that, but the larger question is this: should
fast-math change the tie-breaking behavior of
| rint/nearbyint/round, etc. and, if so, should we make a specific effort to
have all backends provide the same guarantee (or lack of a guarantee) in
this regard?

I don't know, primarily because I've never really been involved in anything
where I've cared about using exotic rounding modes. But in general I'm of
the opinion that -fast-math is the "nuclear option" that's allowed to do
lots of things which may well invoke backend specific behaviour. (That's
also why I think that most FP transformations shouldn't be "only" guarded by
fast-math but a more precise option.)

Cheers,
Dave







More information about the llvm-dev mailing list