/* { dg-do compile { target c++11 } } */ /* { dg-options "-O2 -msse2 -fdump-tree-optimized" } */ template using V [[gnu::vector_size(16)]] = T; template )> V load(const void *p) { using W = V; W r; __builtin_memcpy(&r, p, M); return r; } // movq or movsd template V load(const void *); // bad template V load(const void *); // bad template V load(const void *); // bad template V load(const void *); // good // the following is disabled because V2SF isn't a supported mode // template V load(const void *); // bad template V load(const void *); // good (movsd?) // movd or movss template V load(const void *); // bad template V load(const void *); // bad template V load(const void *); // good template V load(const void *); // good /* We should end up with one load and one insert for each function. */ /* { dg-final { scan-tree-dump-times "BIT_INSERT_EXPR" 9 "optimized" } } */ /* { dg-final { scan-tree-dump-times "MEM" 9 "optimized" } } */