Skip to content
  • Preston Gurd's avatar
    Convert sqrt functions into sqrt instructions when -ffast-math is in effect. · 048f99de
    Preston Gurd authored
    When -ffast-math is in effect (on Linux, at least), clang defines
    __FINITE_MATH_ONLY__ > 0 when including <math.h>. This causes the
    preprocessor to include <bits/math-finite.h>, which renames the sqrt functions.
    For instance, "sqrt" is renamed as "__sqrt_finite". 
    
    This patch adds the 3 new names in such a way that they will be treated
    as equivalent to their respective original names.
    
    llvm-svn: 182739
    048f99de
Loading