Backport @fastmath x^2 inlining regression to 1.12
#60686
Merged
@fastmath x^2 inlining regression to 1.12
#60686