https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110018
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> --- Even we have direct optab for unsigned char to long long, BB vectorizer failer to optimize void foo1 (long long* __restrict a, unsigned char* b) { a[0] = b[0]; a[1] = b[1]; a[2] = b[2]; a[3] = b[3]; a[4] = b[4]; a[5] = b[5]; a[6] = b[6]; a[7] = b[7]; } since we have vectype_out as V4DImode, but vectype_in as V8QImode as *vectype = SLP_TREE_VECTYPE (child); If manually change the testcase to void foo1 (long long* __restrict a, unsigned char* b) { a[0] = b[0]; a[1] = b[1]; a[2] = b[2]; a[3] = b[3]; } Then BB vectorizer can do vectorization, but still failed for void foo1 (double* __restrict a, unsigned char* b) { a[0] = b[0]; a[1] = b[1]; a[2] = b[2]; a[3] = b[3]; } So it looks there're 2 separate issue 1. As mentioned in the PR, we can use intermediate type for vectorizable unsigned char to double. 2. There's mismatch between vectype_out and vectype_in as SLP_TREE_VECTYPE (child);