-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Closed
Labels
floating-pointFloating-point mathFloating-point mathllvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimization
Description
Test case:
https://godbolt.org/z/joGE9G4KM
#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
.
Metadata
Metadata
Assignees
Labels
floating-pointFloating-point mathFloating-point mathllvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimization