The vect_get_smallest_scalar_type helper function was using any argument to a simd clone call when trying to determine the smallest scalar type that would be vectorized. This included the function pointer type in a MASK_CALL for instance, and would result in the wrong type being selected. Instead this patch special cases simd_clone_call's and uses only scalar types of the original function that get transformed into vector types. gcc/ChangeLog: * tree-vect-data-refs.cci (vect_get_smallest_scalar_type): Special case simd clone calls and only use types that are mapped to vectors. * tree-vect-stmts.cc (simd_clone_call_p): New helper function. * tree-vectorizer.h (simd_clone_call_p): Declare new function. gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-simd-clone-16f.c: Remove unnecessary differentation between targets with different pointer sizes. * gcc.dg/vect/vect-simd-clone-17f.c: Likewise. * gcc.dg/vect/vect-simd-clone-18f.c: Likewise.