https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83353
Bug ID: 83353 Summary: Missed optimization in math expression: sin(asin(a)) == a Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zamazan4ik at tut dot by Target Milestone: --- gcc(trunk) with '--std=c++17 -O3 -march=native -ffast-math' flags for this code: #include <cmath> double test(double a) { return sin(asin(a)); } generates this assembly: test(double): sub rsp, 8 call __asin_finite add rsp, 8 jmp sin But sin(asin(a)) == a. So there is no reason to call anything.