1 // RUN: mlir-translate --mlir-to-llvmir %s | FileCheck %s
3 // CHECK-LABEL: define <16 x float> @LLVM_x86_avx512_mask_ps_512
4 llvm.func @LLVM_x86_avx512_mask_ps_512(%a: vector<16 x f32>,
8 %b = llvm.mlir.constant(42 : i32) : i32
9 // CHECK: call <16 x float> @llvm.x86.avx512.mask.rndscale.ps.512(<16 x float>
10 %0 = "x86vector.avx512.intr.mask.rndscale.ps.512"(%a, %b, %a, %c, %b) :
11 (vector<16 x f32>, i32, vector<16 x f32>, i16, i32) -> vector<16 x f32>
12 // CHECK: call <16 x float> @llvm.x86.avx512.mask.scalef.ps.512(<16 x float>
13 %1 = "x86vector.avx512.intr.mask.scalef.ps.512"(%a, %a, %a, %c, %b) :
14 (vector<16 x f32>, vector<16 x f32>, vector<16 x f32>, i16, i32) -> vector<16 x f32>
15 llvm.return %1: vector<16 x f32>
18 // CHECK-LABEL: define <8 x double> @LLVM_x86_avx512_mask_pd_512
19 llvm.func @LLVM_x86_avx512_mask_pd_512(%a: vector<8xf64>,
23 %b = llvm.mlir.constant(42 : i32) : i32
24 // CHECK: call <8 x double> @llvm.x86.avx512.mask.rndscale.pd.512(<8 x double>
25 %0 = "x86vector.avx512.intr.mask.rndscale.pd.512"(%a, %b, %a, %c, %b) :
26 (vector<8xf64>, i32, vector<8xf64>, i8, i32) -> vector<8xf64>
27 // CHECK: call <8 x double> @llvm.x86.avx512.mask.scalef.pd.512(<8 x double>
28 %1 = "x86vector.avx512.intr.mask.scalef.pd.512"(%a, %a, %a, %c, %b) :
29 (vector<8xf64>, vector<8xf64>, vector<8xf64>, i8, i32) -> vector<8xf64>
30 llvm.return %1: vector<8xf64>
33 // CHECK-LABEL: define <16 x float> @LLVM_x86_mask_compress
34 llvm.func @LLVM_x86_mask_compress(%k: vector<16xi1>, %a: vector<16xf32>)
37 // CHECK: call <16 x float> @llvm.x86.avx512.mask.compress.v16f32(
38 %0 = "x86vector.avx512.intr.mask.compress"(%a, %a, %k) :
39 (vector<16xf32>, vector<16xf32>, vector<16xi1>) -> vector<16xf32>
40 llvm.return %0 : vector<16xf32>
43 // CHECK-LABEL: define { <16 x i1>, <16 x i1> } @LLVM_x86_vp2intersect_d_512
44 llvm.func @LLVM_x86_vp2intersect_d_512(%a: vector<16xi32>, %b: vector<16xi32>)
45 -> !llvm.struct<(vector<16 x i1>, vector<16 x i1>)>
47 // CHECK: call { <16 x i1>, <16 x i1> } @llvm.x86.avx512.vp2intersect.d.512(<16 x i32>
48 %0 = "x86vector.avx512.intr.vp2intersect.d.512"(%a, %b) :
49 (vector<16xi32>, vector<16xi32>) -> !llvm.struct<(vector<16 x i1>, vector<16 x i1>)>
50 llvm.return %0 : !llvm.struct<(vector<16 x i1>, vector<16 x i1>)>
53 // CHECK-LABEL: define { <8 x i1>, <8 x i1> } @LLVM_x86_vp2intersect_q_512
54 llvm.func @LLVM_x86_vp2intersect_q_512(%a: vector<8xi64>, %b: vector<8xi64>)
55 -> !llvm.struct<(vector<8 x i1>, vector<8 x i1>)>
57 // CHECK: call { <8 x i1>, <8 x i1> } @llvm.x86.avx512.vp2intersect.q.512(<8 x i64>
58 %0 = "x86vector.avx512.intr.vp2intersect.q.512"(%a, %b) :
59 (vector<8xi64>, vector<8xi64>) -> !llvm.struct<(vector<8 x i1>, vector<8 x i1>)>
60 llvm.return %0 : !llvm.struct<(vector<8 x i1>, vector<8 x i1>)>
63 // CHECK-LABEL: define <8 x float> @LLVM_x86_avx_rsqrt_ps_256
64 llvm.func @LLVM_x86_avx_rsqrt_ps_256(%a: vector <8xf32>) -> vector<8xf32>
66 // CHECK: call <8 x float> @llvm.x86.avx.rsqrt.ps.256(<8 x float>
67 %0 = "x86vector.avx.intr.rsqrt.ps.256"(%a) : (vector<8xf32>) -> (vector<8xf32>)
68 llvm.return %0 : vector<8xf32>