| Issue |
76605
|
| Summary |
clang is suboptimal for `x / sqrt(y / z)` with fast-math
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
k-arrows
|
Test case:
https://godbolt.org/z/joGE9G4KM
```c
#include<math.h>
double test_sqrt1(double x, double y, double z) {
return x / sqrt(y / z);
}
double test_sqrt2(double x, double y, double z) {
return x * sqrt(z / y);
}
```
My expectation is that the output of `test_sqrt1` will be the same as `test_sqrt2`. The same transformatin is true not only for `sqrt` but also for `cbrt`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs