[PATCH] D48712: [X86] Lowering integer truncation intrinsics to native IR
Mikhail Dvoretckii via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 29 09:16:35 PDT 2018
mike.dvoretsky added inline comments.
================
Comment at: clang/lib/Headers/avx512vlbwintrin.h:1501
+ (__v8qi){0, 0, 0, 0, 0, 0, 0, 0}, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15);
}
----------------
RKSimon wrote:
> Are we happy with using illegal types like this? What about flipping the shuffle and convert?
>
> ```
> return (__m128i)__builtin_convertvector(
> __builtin_shufflevector((__v8hi)__A,
> (__v8hi){0, 0, 0, 0, 0, 0, 0, 0},
> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15), __v16qi);
> ```
This would bring its own issues, since in the cvtepi64_epi8 cases the inner shuffle would produce vectors of 16 64-bit values. There would be no extra typedef, but in the back-end these would be split in type legalization, making it harder to fold them into VPMOV instructions.
https://reviews.llvm.org/D48712
More information about the cfe-commits
mailing list