[LLVMdev] Convert fdiv - X/Y -> X*1/Y

Shuxin Yang shuxin.llvm at gmail.com
Thu Aug 8 10:41:12 PDT 2013


Yes it is precise, if Y is constant and 1/Y is exact.  In this case, 
this transformation is conducted without "-fast-math".
What I meant is if 1/Y is not exact.  I measured the results before. 
Among all fast-math transformation,
reciprocal is most annoying one because it is very imprecise. I was 
arguing at that time that reciprocal should be
ranked as the most relax xfrom.  It seems the numerical guru Steve kinda 
agree with me.

On 8/8/13 10:32 AM, Joerg Sonnenberger wrote:
> On Thu, Aug 08, 2013 at 10:13:07AM -0700, Shuxin Yang wrote:
>> You should be very careful, reciprocal is very very very imprecise
>> transformation. Sometimes you will see big different
>> with and without this xform.
> What about constant %a, %b in this case? At least for power-of-two
> arguments, wouldn't it still be precise?
>
> Joerg
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list