Issue 175166
Summary Recent regression of sqrt optimization when the argument cannot be negative
Labels new issue
Assignees
Reporter TiborGY
    With LLVM 21, and until a few days ago with trunk, the following code would be optimized to not have a branch to a sqrt library call, as it is impossible for the square of a number to be invalid input for sqrt, therefore having to potentially set errno is not required.
The responsible transformation used to happen in AggressiveInstCombinePass.
See: https://godbolt.org/z/bqWedbKfd
But in the last few days something regressed this and AggressiveInstCombinePass misses this optimization.
Related but distinct issue: #174813 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to