[LLVMdev] [RFC] Extend LLVM IR to express "fast-math" at a per-instruction level

Duncan Sands baldrick at free.fr
Fri Nov 2 10:33:54 PDT 2012


Hi Michael,

 > I should separate out Reciprocal from the rest of "A", as I believe that's 
pretty separable and safer than allowing the other transforms.

I think forming the reciprocal only introduces a bounded number of ULPs of
error, so you could use 'fpmath' metadata for this, by giving it a big enough
value.  It might be nice to allow 'bounded' as a value for fpmath metadata,
which would allow anything which introduces at most a bounded number of ULPs
of error (unlike reassociation which can introduce an unbounded amount of
inaccuracy) like this or for example -0.0 -> 0.0.

Ciao, Duncan.



More information about the llvm-dev mailing list