<div dir="ltr"><div>I posted a similar issue, but this relates to how to keep a function call from being lowered to an ISD:FABS.</div><div><br></div><div>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:</div>
<div><br></div><div>%5 = load douuble %x, align 8</div><div>%call = call double @fabs(double %5) nounwind readnone</div><div><br></div><div>I want the call to remain, but somewhere in LLVM, it is take the call to fabs and translating it to a ISD:FABS.</div>
<div><br></div><div>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:</div><div><br></div><div>1- Is there a better way then having a subroutine call go to ISD:FABS, only to come back to a subroutine call?</div>
<div><br></div><div>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</div>
<div><br></div><div>Is there a good practice I can follow to deal with supporting floating-point with software-only libraries and suggestions?</div></div>