jyknight wrote:

> ```
> ; Function Attrs: nounwind optsize
> define dso_local float @f(float noundef %0, float noundef %1) 
> local_unnamed_addr #0 {
>   %3 = tail call float @_hypotf(float noundef %0, float noundef %1) #2, 
> !inline_history !6
>   ret float %3
> }
> 
> ; Function Attrs: optsize
> declare dllimport float @_hypotf(float noundef, float noundef) 
> local_unnamed_addr #1
> ```

This example shows something completely different than the PR description 
implies, and makes the proposed fix seem even less valid.

This demonstrates that "hypotf" is defined as an _inline function_ in MS CRT's 
math.h header, NOT as a dllimport function. The inline "hypotf" function simply 
calls the external (dllimport) `_hypotf` -- and that's what you see in this IR 
snippet, because it's post-inlining.

https://github.com/llvm/llvm-project/pull/204792
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to