https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93078
Alexander Monakov <amonakov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Status|UNCONFIRMED |NEW Last reconfirmed| |2019-12-27 CC| |amonakov at gcc dot gnu.org Component|tree-optimization |target Ever confirmed|0 |1 --- Comment #1 from Alexander Monakov <amonakov at gcc dot gnu.org> --- > [...] not sure why dont auto-vectorize the function round directly to > "roundps xmm0, XMMWORD PTR a[rip], 0" This is because C round function is specified to use a non-standard rounding, with halfway cases away from zero, not to nearest even. Hence a few extra instructions to fix up halfway arguments. For nearbyint, looks like CASE_CFN_NEARBYINT is not handled in ix86_builtin_vectorized_function. Confirming for this case.