• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: mlir-opt -verify-diagnostics %s | mlir-opt | mlir-translate --avx512-mlir-to-llvmir | FileCheck %s
2
3// CHECK-LABEL: define <16 x float> @LLVM_x86_avx512_mask_ps_512
4llvm.func @LLVM_x86_avx512_mask_ps_512(%a: !llvm.vec<16 x float>,
5                                       %b: !llvm.i32,
6                                       %c: !llvm.i16)
7  -> (!llvm.vec<16 x float>)
8{
9  // CHECK: call <16 x float> @llvm.x86.avx512.mask.rndscale.ps.512(<16 x float>
10  %0 = "llvm_avx512.mask.rndscale.ps.512"(%a, %b, %a, %c, %b) :
11    (!llvm.vec<16 x float>, !llvm.i32, !llvm.vec<16 x float>, !llvm.i16, !llvm.i32) -> !llvm.vec<16 x float>
12  // CHECK: call <16 x float> @llvm.x86.avx512.mask.scalef.ps.512(<16 x float>
13  %1 = "llvm_avx512.mask.scalef.ps.512"(%a, %a, %a, %c, %b) :
14    (!llvm.vec<16 x float>, !llvm.vec<16 x float>, !llvm.vec<16 x float>, !llvm.i16, !llvm.i32) -> !llvm.vec<16 x float>
15  llvm.return %1: !llvm.vec<16 x float>
16}
17
18// CHECK-LABEL: define <8 x double> @LLVM_x86_avx512_mask_pd_512
19llvm.func @LLVM_x86_avx512_mask_pd_512(%a: !llvm.vec<8 x double>,
20                                       %b: !llvm.i32,
21                                       %c: !llvm.i8)
22  -> (!llvm.vec<8 x double>)
23{
24  // CHECK: call <8 x double> @llvm.x86.avx512.mask.rndscale.pd.512(<8 x double>
25  %0 = "llvm_avx512.mask.rndscale.pd.512"(%a, %b, %a, %c, %b) :
26    (!llvm.vec<8 x double>, !llvm.i32, !llvm.vec<8 x double>, !llvm.i8, !llvm.i32) -> !llvm.vec<8 x double>
27  // CHECK: call <8 x double> @llvm.x86.avx512.mask.scalef.pd.512(<8 x double>
28  %1 = "llvm_avx512.mask.scalef.pd.512"(%a, %a, %a, %c, %b) :
29    (!llvm.vec<8 x double>, !llvm.vec<8 x double>, !llvm.vec<8 x double>, !llvm.i8, !llvm.i32) -> !llvm.vec<8 x double>
30  llvm.return %1: !llvm.vec<8 x double>
31}
32