2016-01-18 20:02:45 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mattr=+avx512f | FileCheck %s
|
2013-11-16 01:01:14 +08:00
|
|
|
|
2015-06-29 17:10:00 +08:00
|
|
|
declare <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32)
|
|
|
|
declare <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32)
|
2014-12-23 18:30:39 +08:00
|
|
|
|
2013-11-16 01:01:14 +08:00
|
|
|
define <16 x float> @test_x86_vfnmadd_ps_z(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_x86_vfnmadd_ps_z:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfnmadd213ps %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfnmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 -1, i32 4) nounwind
|
2013-11-16 01:01:14 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
2015-06-29 17:10:00 +08:00
|
|
|
declare <16 x float> @llvm.x86.avx512.mask.vfnmadd.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32) nounwind readnone
|
2013-11-16 01:01:14 +08:00
|
|
|
|
2014-12-23 18:30:39 +08:00
|
|
|
define <16 x float> @test_mask_vfnmadd_ps(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_vfnmadd_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmadd132ps %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfnmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask, i32 4) nounwind
|
2014-12-23 18:30:39 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
2013-11-16 01:01:14 +08:00
|
|
|
define <8 x double> @test_x86_vfnmadd_pd_z(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_x86_vfnmadd_pd_z:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfnmadd213pd %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 4) nounwind
|
2013-11-16 01:01:14 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
2015-06-29 17:10:00 +08:00
|
|
|
declare <8 x double> @llvm.x86.avx512.mask.vfnmadd.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32) nounwind readnone
|
2013-11-16 01:01:14 +08:00
|
|
|
|
2014-12-23 18:30:39 +08:00
|
|
|
define <8 x double> @test_mask_vfnmadd_pd(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_vfnmadd_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmadd132pd %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 4) nounwind
|
2014-12-23 18:30:39 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
2013-11-16 01:01:14 +08:00
|
|
|
define <16 x float> @test_x86_vfnmsubps_z(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_x86_vfnmsubps_z:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213ps %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfnmsub.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 -1, i32 4) nounwind
|
2013-11-16 01:01:14 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
2015-06-29 17:10:00 +08:00
|
|
|
declare <16 x float> @llvm.x86.avx512.mask.vfnmsub.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32) nounwind readnone
|
2013-11-16 01:01:14 +08:00
|
|
|
|
2014-12-23 18:30:39 +08:00
|
|
|
define <16 x float> @test_mask_vfnmsub_ps(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_vfnmsub_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132ps %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfnmsub.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask, i32 4) nounwind
|
2014-12-23 18:30:39 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
2013-11-16 01:01:14 +08:00
|
|
|
define <8 x double> @test_x86_vfnmsubpd_z(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_x86_vfnmsubpd_z:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213pd %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 4) nounwind
|
2013-11-16 01:01:14 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
2015-06-29 17:10:00 +08:00
|
|
|
declare <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32) nounwind readnone
|
2013-11-16 01:01:14 +08:00
|
|
|
|
2014-12-23 18:30:39 +08:00
|
|
|
define <8 x double> @test_mask_vfnmsub_pd(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_vfnmsub_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132pd %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 4) nounwind
|
2014-12-23 18:30:39 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
2013-11-16 01:01:14 +08:00
|
|
|
define <16 x float> @test_x86_vfmaddsubps_z(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_x86_vfmaddsubps_z:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub213ps %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmaddsub.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 -1, i32 4) nounwind
|
2013-11-16 01:01:14 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
2014-08-15 01:13:30 +08:00
|
|
|
|
2014-08-15 01:13:33 +08:00
|
|
|
define <16 x float> @test_mask_fmaddsub_ps(<16 x float> %a, <16 x float> %b, <16 x float> %c, i16 %mask) {
|
|
|
|
; CHECK-LABEL: test_mask_fmaddsub_ps:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub132ps %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmaddsub.ps.512(<16 x float> %a, <16 x float> %b, <16 x float> %c, i16 %mask, i32 4)
|
2014-08-15 01:13:33 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-06-29 17:10:00 +08:00
|
|
|
declare <16 x float> @llvm.x86.avx512.mask.vfmaddsub.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32) nounwind readnone
|
2013-11-16 01:01:14 +08:00
|
|
|
|
|
|
|
define <8 x double> @test_x86_vfmaddsubpd_z(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_x86_vfmaddsubpd_z:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub213pd %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmaddsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 4) nounwind
|
2013-11-16 01:01:14 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
2015-06-29 17:10:00 +08:00
|
|
|
declare <8 x double> @llvm.x86.avx512.mask.vfmaddsub.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32) nounwind readnone
|
2013-11-16 01:01:14 +08:00
|
|
|
|
2014-12-23 18:30:39 +08:00
|
|
|
define <8 x double> @test_mask_vfmaddsub_pd(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_vfmaddsub_pd:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub132pd %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmaddsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 4) nounwind
|
2013-11-16 01:01:14 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
2014-12-23 18:30:39 +08:00
|
|
|
|
2015-06-29 17:10:00 +08:00
|
|
|
define <8 x double>@test_int_x86_avx512_mask_vfmaddsub_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vfmaddsub_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm0, %zmm3
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub132pd %zmm1, %zmm2, %zmm3 {%k1}
|
|
|
|
; CHECK-NEXT: vfmaddsub213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmaddsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask.vfmaddsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x double> @llvm.x86.avx512.mask3.vfmaddsub.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32)
|
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_mask3_vfmaddsub_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfmaddsub_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm3
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub231pd %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask3.vfmaddsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask3.vfmaddsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x double> @llvm.x86.avx512.maskz.vfmaddsub.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32)
|
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_maskz_vfmaddsub_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vfmaddsub_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm3
|
|
|
|
; CHECK-NEXT: vfmaddsub213pd %zmm2, %zmm0, %zmm3 {%k1} {z}
|
|
|
|
; CHECK-NEXT: vfmaddsub213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.maskz.vfmaddsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.maskz.vfmaddsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask_vfmaddsub_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vfmaddsub_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm0, %zmm3
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub132ps %zmm1, %zmm2, %zmm3 {%k1}
|
|
|
|
; CHECK-NEXT: vfmaddsub213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmaddsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask.vfmaddsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x float> @llvm.x86.avx512.mask3.vfmaddsub.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32)
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask3_vfmaddsub_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfmaddsub_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm3
|
|
|
|
; CHECK-NEXT: vfmaddsub231ps %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmaddsub213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask3.vfmaddsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask3.vfmaddsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x float> @llvm.x86.avx512.maskz.vfmaddsub.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32)
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_maskz_vfmaddsub_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vfmaddsub_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm3
|
|
|
|
; CHECK-NEXT: vfmaddsub213ps %zmm2, %zmm0, %zmm3 {%k1} {z}
|
|
|
|
; CHECK-NEXT: vfmaddsub213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.maskz.vfmaddsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.maskz.vfmaddsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x double> @llvm.x86.avx512.mask3.vfmsubadd.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32)
|
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_mask3_vfmsubadd_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfmsubadd_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm3
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: vfmsubadd231pd %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmsubadd213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask3.vfmsubadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask3.vfmsubadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x float> @llvm.x86.avx512.mask3.vfmsubadd.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32)
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask3_vfmsubadd_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfmsubadd_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm3
|
|
|
|
; CHECK-NEXT: vfmsubadd231ps %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmsubadd213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask3.vfmsubadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask3.vfmsubadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
2014-12-23 18:30:39 +08:00
|
|
|
}
|
|
|
|
|
2015-01-28 18:21:27 +08:00
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrb_rne(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrb_rne:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132ps {rn-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask, i32 0) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrb_rtn(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrb_rtn:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132ps {rd-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask, i32 1) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrb_rtp(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrb_rtp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132ps {ru-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask, i32 2) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrb_rtz(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrb_rtz:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132ps {rz-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask, i32 3) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrb_current(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrb_current:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132ps %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 %mask, i32 4) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrbz_rne(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrbz_rne:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfmadd213ps {rn-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 -1, i32 0) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrbz_rtn(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrbz_rtn:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfmadd213ps {rd-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 -1, i32 1) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrbz_rtp(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrbz_rtp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfmadd213ps {ru-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 -1, i32 2) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrbz_rtz(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrbz_rtz:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfmadd213ps {rz-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 -1, i32 3) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float> @test_mask_round_vfmadd512_ps_rrbz_current(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_ps_rrbz_current:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfmadd213ps %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %a0, <16 x float> %a1, <16 x float> %a2, i16 -1, i32 4) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <16 x float> %res
|
|
|
|
}
|
|
|
|
|
2015-06-29 17:10:00 +08:00
|
|
|
declare <8 x double> @llvm.x86.avx512.mask3.vfmsub.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32)
|
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_mask3_vfmsub_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfmsub_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm3
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: vfmsub231pd %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmsub213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask3.vfmsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask3.vfmsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x float> @llvm.x86.avx512.mask3.vfmsub.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32)
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask3_vfmsub_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfmsub_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm3
|
|
|
|
; CHECK-NEXT: vfmsub231ps %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmsub213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask3.vfmsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask3.vfmsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
2015-01-28 18:21:27 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrb_rne(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrb_rne:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132pd {rn-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 0) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrb_rtn(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrb_rtn:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132pd {rd-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 1) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrb_rtp(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrb_rtp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132pd {ru-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 2) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrb_rtz(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrb_rtz:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132pd {rz-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 3) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrb_current(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrb_current:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132pd %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 4) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrbz_rne(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrbz_rne:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfmadd213pd {rn-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 0) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrbz_rtn(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrbz_rtn:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfmadd213pd {rd-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 1) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrbz_rtp(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrbz_rtp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfmadd213pd {ru-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 2) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrbz_rtz(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrbz_rtz:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfmadd213pd {rz-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 3) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfmadd512_pd_rrbz_current(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfmadd512_pd_rrbz_current:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfmadd213pd %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 4) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
2015-06-29 17:10:00 +08:00
|
|
|
define <8 x double>@test_int_x86_avx512_mask_vfmadd_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vfmadd_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm0, %zmm3
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132pd %zmm1, %zmm2, %zmm3 {%k1}
|
|
|
|
; CHECK-NEXT: vfmadd213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask.vfmadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x double> @llvm.x86.avx512.mask3.vfmadd.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32)
|
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_mask3_vfmadd_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfmadd_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm3
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: vfmadd231pd %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask3.vfmadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask3.vfmadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x double> @llvm.x86.avx512.maskz.vfmadd.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32)
|
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_maskz_vfmadd_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vfmadd_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm1, %zmm3
|
|
|
|
; CHECK-NEXT: vfmadd213pd %zmm2, %zmm0, %zmm3 {%k1} {z}
|
|
|
|
; CHECK-NEXT: vfmadd213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.maskz.vfmadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.maskz.vfmadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask_vfmadd_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vfmadd_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm0, %zmm3
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd132ps %zmm1, %zmm2, %zmm3 {%k1}
|
|
|
|
; CHECK-NEXT: vfmadd213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask.vfmadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x float> @llvm.x86.avx512.mask3.vfmadd.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32)
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask3_vfmadd_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfmadd_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm3
|
|
|
|
; CHECK-NEXT: vfmadd231ps %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfmadd213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask3.vfmadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask3.vfmadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x float> @llvm.x86.avx512.maskz.vfmadd.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32)
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_maskz_vfmadd_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vfmadd_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vmovaps %zmm1, %zmm3
|
|
|
|
; CHECK-NEXT: vfmadd213ps %zmm2, %zmm0, %zmm3 {%k1} {z}
|
|
|
|
; CHECK-NEXT: vfmadd213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.maskz.vfmadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.maskz.vfmadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|
|
|
|
|
2015-01-28 18:21:27 +08:00
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrb_rne(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrb_rne:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132pd {rn-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 0) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrb_rtn(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrb_rtn:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132pd {rd-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 1) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrb_rtp(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrb_rtp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132pd {ru-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 2) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrb_rtz(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrb_rtz:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132pd {rz-sae}, %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 3) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrb_current(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrb_current:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132pd %zmm1, %zmm2, %zmm0 {%k1}
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 %mask, i32 4) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrbz_rne(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrbz_rne:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213pd {rn-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 0) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrbz_rtn(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrbz_rtn:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213pd {rd-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 1) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrbz_rtp(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrbz_rtp:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213pd {ru-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 2) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrbz_rtz(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrbz_rtz:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-08-12 06:07:33 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213pd {rz-sae}, %zmm2, %zmm1, %zmm0
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 3) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double> @test_mask_round_vfnmsub512_pd_rrbz_current(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2) {
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-LABEL: test_mask_round_vfnmsub512_pd_rrbz_current:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213pd %zmm2, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2015-06-29 17:10:00 +08:00
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %a0, <8 x double> %a1, <8 x double> %a2, i8 -1, i32 4) nounwind
|
2015-01-28 18:21:27 +08:00
|
|
|
ret <8 x double> %res
|
|
|
|
}
|
2015-06-29 17:10:00 +08:00
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_mask_vfnmsub_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vfnmsub_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm0, %zmm3
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132pd %zmm1, %zmm2, %zmm3 {%k1}
|
|
|
|
; CHECK-NEXT: vfnmsub213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask.vfnmsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x double> @llvm.x86.avx512.mask3.vfnmsub.pd.512(<8 x double>, <8 x double>, <8 x double>, i8, i32)
|
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_mask3_vfnmsub_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfnmsub_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm2, %zmm3
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: vfnmsub231pd %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask3.vfnmsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask3.vfnmsub.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask_vfnmsub_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vfnmsub_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm0, %zmm3
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub132ps %zmm1, %zmm2, %zmm3 {%k1}
|
|
|
|
; CHECK-NEXT: vfnmsub213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfnmsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask.vfnmsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <16 x float> @llvm.x86.avx512.mask3.vfnmsub.ps.512(<16 x float>, <16 x float>, <16 x float>, i16, i32)
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask3_vfnmsub_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask3_vfnmsub_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm2, %zmm3
|
|
|
|
; CHECK-NEXT: vfnmsub231ps %zmm1, %zmm0, %zmm3 {%k1}
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmsub213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask3.vfnmsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask3.vfnmsub.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <8 x double>@test_int_x86_avx512_mask_vfnmadd_pd_512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vfnmadd_pd_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2016-01-18 20:02:45 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2016-07-22 13:00:52 +08:00
|
|
|
; CHECK-NEXT: vmovapd %zmm0, %zmm3
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmadd132pd %zmm1, %zmm2, %zmm3 {%k1}
|
|
|
|
; CHECK-NEXT: vfnmadd213pd {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddpd %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <8 x double> @llvm.x86.avx512.mask.vfnmadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 %x3, i32 4)
|
|
|
|
%res1 = call <8 x double> @llvm.x86.avx512.mask.vfnmadd.pd.512(<8 x double> %x0, <8 x double> %x1, <8 x double> %x2, i8 -1, i32 0)
|
|
|
|
%res2 = fadd <8 x double> %res, %res1
|
|
|
|
ret <8 x double> %res2
|
|
|
|
}
|
|
|
|
|
|
|
|
define <16 x float>@test_int_x86_avx512_mask_vfnmadd_ps_512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3){
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vfnmadd_ps_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
|
|
|
; CHECK-NEXT: vmovaps %zmm0, %zmm3
|
2016-07-25 15:20:28 +08:00
|
|
|
; CHECK-NEXT: vfnmadd132ps %zmm1, %zmm2, %zmm3 {%k1}
|
|
|
|
; CHECK-NEXT: vfnmadd213ps {rn-sae}, %zmm2, %zmm0, %zmm1
|
|
|
|
; CHECK-NEXT: vaddps %zmm1, %zmm3, %zmm0
|
2015-06-29 17:10:00 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
%res = call <16 x float> @llvm.x86.avx512.mask.vfnmadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 %x3, i32 4)
|
|
|
|
%res1 = call <16 x float> @llvm.x86.avx512.mask.vfnmadd.ps.512(<16 x float> %x0, <16 x float> %x1, <16 x float> %x2, i16 -1, i32 0)
|
|
|
|
%res2 = fadd <16 x float> %res, %res1
|
|
|
|
ret <16 x float> %res2
|
|
|
|
}
|