[LLVMdev] Floating-point FABS - supporting

Duncan Sands baldrick at free.fr
Mon May 13 02:42:00 PDT 2013


Hi Dan, does -fno-builtin help?

Ciao, Duncan.

On 06/05/13 20:41, Dan wrote:
> I posted a similar issue, but this relates to how to keep a function call from
> being lowered to an ISD:FABS.
>
> In this case, I don't want FABS (floating point absolute) to be converted into
> an operation).  In this case, what happens is that clang generates the code for
> floating point absolute (fabs) as a subroutine call:
>
> %5 = load douuble %x, align 8
> %call = call double @fabs(double %5) nounwind readnone
>
> I want the call to remain, but somewhere in LLVM, it is take the call to fabs
> and translating it to a ISD:FABS.
>
> Again, I can try to custom lower ISD:FABS to a RTLIB call, but there are two
> issues about the best way to handle it:
>
> 1- Is there a better way then having a subroutine call go to ISD:FABS, only to
> come back to a subroutine call?
>
> 2- FABS is not in the list of LLVM RTLIB calls, and my hope was to handle
> everything in the Target generation, rather than change another directory in
> the: /lib/CodeGen/SelectionDAG or include/llvm/CodeGen/ISDOpcodes.h
>
> Is there a good practice I can follow to deal with supporting floating-point
> with software-only libraries and suggestions?
>
>
> _______________________________________________
> 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