Displaying 1 result from an estimated 1 matches for "ed86362f".
2015 Dec 22
2
Question about __builtin_assume()
void test_copy_vec(const short* restrict src, short* restrict res, int N) {
__builtin_assume( (N > 1) && (N%2 == 0) );
#pragma clang loop vectorize(enable) vectorize_width(2) interleave_count(1)
for (int j=0; j<N; ++j)
*res++ = *src++;
}
If I use __builtin_assume(N>1) then llvm knows the loop will execute and not check for (j <= 0), but I can't seem to get it to