[PATCH] D41096: [X86] Initial support for prefer-vector-width function attribute

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 10:48:14 PST 2017


spatel added a comment.

I've read the description, but it's still not clear to me what the desired result should be for this:

  #include <immintrin.h>
  
  __m512i add16elts(__m512i x, __m512i y) {
    return _mm512_add_epi32(x, y);
  }

$ ./clang add512.c -O1 -S -o - -mavx512f -mprefer-vector-width=256 | grep padd
	vpaddd	%zmm0, %zmm1, %zmm0

I understand this wouldn't be affected by this patch as-is, but do we want the pref to override source that explicitly asked for a certain vector op?


https://reviews.llvm.org/D41096





More information about the llvm-commits mailing list