[PATCH] [X86] Add HasAVX512 patterns for SS SSE intrinsics.

Ahmed Bougacha ahmed.bougacha at gmail.com
Thu Apr 30 07:08:11 PDT 2015


================
Comment at: lib/Target/X86/X86InstrAVX512.td:3365
@@ -3364,1 +3364,3 @@
 
+// Also match the pre-AVX512 intrinsics.
+multiclass avx512_sse_scalar_intrin_patterns<string OpcodeStr, string IntStr> {
----------------
delena wrote:
> All AVX-512 intrinsics, even FP scalar, come with masks and with rounding mode.
> I don't understand where these intrinsics _sse_avx512_ come from.
> Due to very complex form of these inrinsics, we add them to X86IntrinsicsInfo.h
These patterns are just for the SSE1/SSE2 intrinsics (_mm_add_ss, int_x86_sse_add_ss, ...;  see tests), which will fail to select when used on AVX512, because the X86InstrSSE.td SI defs are all predicated on "UseAVX" rather than "HaveAVX".

I went with patterns because for _ss, IntrinsicsInfo would turn something like _mm_add_ss to a v4f32 fadd and later addps.  We could add an IntrinsicType for _ss _2OP, or maybe even, an additional field in the intrinsic data tables saying that even though an intrinsic has vector type, it's just a scalar op?

http://reviews.llvm.org/D9362

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list