[PATCH] AVX-512 ERI Instrinsics for scalar instructions

Adam Nemet anemet at apple.com
Mon Dec 8 10:13:12 PST 2014


================
Comment at: lib/Target/X86/X86InstrAVX512.td:124-126
@@ -117,1 +123,5 @@
+// the scalar staff
+def f32x_info    : X86VectorVTInfo<1,  f32, VR128X, "ss">;
+def f64x_info    : X86VectorVTInfo<1,  f64, VR128X, "sd">;
+
 class AVX512VLVectorVTInfo<X86VectorVTInfo i512, X86VectorVTInfo i256,
----------------
delena wrote:
> anemet wrote:
> > Why not FR32X and FR64X for RC?
> I can't just change to FR32X, I have compilation errors in this case:
> 
> VRSQRT28SSrkz:  (set FR32X:<empty>:$dst, (X86select:<empty> VK1WM:i1:$mask, (X86rsqrt28s:v4f32 FR32X:<empty>:$src1, FR32X:v4f32:$src2, (imm:i32)<<P:Predicate_FROUND_CURRENT>>), (bitconvert:v4f32 (build_vector:v4i32)<<P:Predicate_immAllZerosV>>)))
> Included from lib/Target/X86/X86.td:432:
> Included from lib/Target/X86/X86InstrInfo.td:2387:
>   lib/Target/X86/X86InstrAVX512.td:4253:3:** error: In VRSQRT28SSrkz: Type inference contradiction found, merging 'f32' into 'v4f32'**
>   defm VRSQRT28 : avx512_eri_s<0xCD, "vrsqrt28", X86rsqrt28s>, T8PD, EVEX_4V;
> 
> In this case I should rewrite the full conception of FP scalars, used also in AVX and AVX2. Not sure that it is what we need now.
OK.  I made this comment when I still thought that these _info object were wrapping the scalar types.  A better way to think about them is the "closest" vector type so that masking can be applied.

http://reviews.llvm.org/D6378






More information about the llvm-commits mailing list