BUILTIN directive (The GNU Fortran Compiler)

#### 6.2.3 `BUILTIN` directive ¶

The syntax of the directive is

`!GCC$ BUILTIN (B) attributes simd FLAGS IF('target')`

You can use this directive to define which middle-end built-ins provide vector implementations. B is name of the middle-end built-in. FLAGS are optional and must be either `(inbranch)` or `(notinbranch)`. `IF` statement is optional and is used to filter multilib ABIs for the built-in that should be vectorized. Example usage:

    !GCC$ builtin (sinf) attributes simd (notinbranch) if('x86_64')

The special target `'fastmath'` is used to specify the vector implementation is only valid if fast-math is enabled:

    !GCC$ builtin (exp) attributes simd (notinbranch) if('fastmath')

The purpose of the directive is to provide an API among the GCC compiler and the GNU C Library which would define vector implementations of math routines.