From 6d3d93c40b3a08b6795fee56c8aaca2a2cde5bee Mon Sep 17 00:00:00 2001 From: Cameron McInally Date: Wed, 4 Dec 2013 18:05:36 +0000 Subject: [PATCH] Fix assembly syntax for AVX512 vector blend instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196393 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrAVX512.td | 4 ++-- test/CodeGen/X86/avx512-intrinsics.ll | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86InstrAVX512.td b/lib/Target/X86/X86InstrAVX512.td index cb19fbd5638..012934140ff 100644 --- a/lib/Target/X86/X86InstrAVX512.td +++ b/lib/Target/X86/X86InstrAVX512.td @@ -627,14 +627,14 @@ multiclass avx512_blendmask opc, string OpcodeStr, Intrinsic Int, def rm : AVX5128I, EVEX_4V, EVEX_K; def rm_Int : AVX5128I, EVEX_4V, EVEX_K; diff --git a/test/CodeGen/X86/avx512-intrinsics.ll b/test/CodeGen/X86/avx512-intrinsics.ll index 5bdabf23499..fb9d68cf4d7 100644 --- a/test/CodeGen/X86/avx512-intrinsics.ll +++ b/test/CodeGen/X86/avx512-intrinsics.ll @@ -355,6 +355,15 @@ define <8 x double> @test_x86_mskblend_pd_512(i8 %a0, <8 x double> %a1, <8 x dou %res = call <8 x double> @llvm.x86.avx512.mskblend.pd.512(<8 x i1> %m0, <8 x double> %a1, <8 x double> %a2) ; <<8 x double>> [#uses=1] ret <8 x double> %res } + +define <8 x double> @test_x86_mskblend_pd_512_memop(<8 x double> %a, <8 x double>* %ptr, i8 %mask) { + ; CHECK-LABEL: test_x86_mskblend_pd_512_memop + ; CHECK: vblendmpd {{.*}}, {{%zmm[0-9]}}, {{%zmm[0-9]}} {%k1} + %vmask = bitcast i8 %mask to <8 x i1> + %b = load <8 x double>* %ptr + %res = call <8 x double> @llvm.x86.avx512.mskblend.pd.512(<8 x i1> %vmask, <8 x double> %a, <8 x double> %b) ; <<8 x double>> [#uses=1] + ret <8 x double> %res +} declare <8 x double> @llvm.x86.avx512.mskblend.pd.512(<8 x i1> %a0, <8 x double> %a1, <8 x double> %a2) nounwind readonly define <16 x i32> @test_x86_mskblend_d_512(i16 %a0, <16 x i32> %a1, <16 x i32> %a2) {