[LLVMdev] Fast-math flags in constant expressions
Sergey Dmitrouk
sdmitrouk at accesssoftek.com
Thu Dec 4 01:38:36 PST 2014
On Wed, Dec 03, 2014 at 11:26:48PM -0800, Owen Anderson wrote:
> That's the opposite of what fast math flags do.
Well, still quite close. Function arguments turned out to be a bad
choice, so Hal suggested using fast-math flags instead. I guess there
isn't many other options.
> If you want to solve that problem, I believe you want to prevent the
> folding of floating point instructions into constant expressions.
Yes, that's what I did at the end. Probably wasn't clear enough in my
previous email.
> The direction you're going seems like a pretty major violation of the
> intended functionality of constant expressions.
If you're talking about adding fast-math flags to constant expressions,
then I'm not going to try that. It just that Language Reference doesn't
note this difference for binary operations inside/outside constant
expressions (maybe I didn't find it, but I was looking there).
--
Sergey
More information about the llvm-dev
mailing list