[llvm] AMDGPU: Replace sqrt OpenCL libcalls with llvm.sqrt (PR #74197)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 02:24:02 PST 2023


rampitec wrote:

> > > > Any codegen changes except IR? It is hard to reason looking at IR only.
> > > 
> > > 
> > > The IR change is the point. The only meaningful codegen tests would be an end-to-end test which also links the libraries in. There's nothing to really test for codegen, other than this can now be directly codegened into a working program.
> > 
> > 
> > But do we have these tests which did not change? Can you identify them? I feel like this pass was ported from HSAIL without tests, which is explainable, because the tests were HSAIL tests. I mean, you did the change, you probably have looked into the ISA which did not became worse. What is that ISA? What is the problem solved here?
> 
> The library implementation loses the fast math information, in forms of the fast math flags and !fpmath metadata. If it's converted to the intrinsic, the backend can directly swap out the implementation. This will help drop the ugly unsafe math control library

I agree. I just want to see an impact.

https://github.com/llvm/llvm-project/pull/74197


More information about the llvm-commits mailing list