2017-02-26 14:45:43 +08:00
|
|
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
2016-07-21 22:36:41 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl -mattr=+avx512ifma | FileCheck %s
|
|
|
|
|
|
|
|
declare <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64>, <8 x i64>, <8 x i64>, i8)
|
|
|
|
|
|
|
|
define <8 x i64>@test_int_x86_avx512_mask_vpmadd52h_uq_512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpmadd52h_uq_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2017-02-26 14:45:45 +08:00
|
|
|
; CHECK-NEXT: vmovdqa64 %zmm0, %zmm3
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq %zmm2, %zmm1, %zmm3
|
2017-02-26 14:45:45 +08:00
|
|
|
; CHECK-NEXT: vmovdqa64 %zmm0, %zmm4
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq %zmm2, %zmm1, %zmm4 {%k1}
|
2017-08-03 16:50:18 +08:00
|
|
|
; CHECK-NEXT: vpxor %xmm2, %xmm2, %xmm2
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq %zmm2, %zmm1, %zmm0 {%k1}
|
2017-05-19 02:50:05 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm0, %zmm4, %zmm0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq %zmm2, %zmm1, %zmm2 {%k1} {z}
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm2, %zmm3, %zmm1
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm0, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2016-07-21 22:36:41 +08:00
|
|
|
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> zeroinitializer, <8 x i64> %x1, <8 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 -1)
|
|
|
|
%res4 = add <8 x i64> %res, %res1
|
|
|
|
%res5 = add <8 x i64> %res3, %res2
|
|
|
|
%res6 = add <8 x i64> %res5, %res4
|
|
|
|
ret <8 x i64> %res6
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64>, <8 x i64>, <8 x i64>, i8)
|
|
|
|
|
|
|
|
define <8 x i64>@test_int_x86_avx512_maskz_vpmadd52h_uq_512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vpmadd52h_uq_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2017-02-26 14:45:45 +08:00
|
|
|
; CHECK-NEXT: vmovdqa64 %zmm0, %zmm3
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq %zmm2, %zmm1, %zmm3
|
2017-02-26 14:45:45 +08:00
|
|
|
; CHECK-NEXT: vmovdqa64 %zmm0, %zmm4
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq %zmm2, %zmm1, %zmm4 {%k1} {z}
|
2017-08-03 16:50:18 +08:00
|
|
|
; CHECK-NEXT: vpxor %xmm2, %xmm2, %xmm2
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq %zmm2, %zmm1, %zmm0 {%k1} {z}
|
2017-05-19 02:50:05 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm0, %zmm4, %zmm0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq %zmm2, %zmm1, %zmm2 {%k1} {z}
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm2, %zmm3, %zmm1
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm0, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2016-07-21 22:36:41 +08:00
|
|
|
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64> zeroinitializer, <8 x i64> %x1, <8 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 -1)
|
|
|
|
%res4 = add <8 x i64> %res, %res1
|
|
|
|
%res5 = add <8 x i64> %res3, %res2
|
|
|
|
%res6 = add <8 x i64> %res5, %res4
|
|
|
|
ret <8 x i64> %res6
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i64> @llvm.x86.avx512.mask.vpmadd52l.uq.512(<8 x i64>, <8 x i64>, <8 x i64>, i8)
|
|
|
|
|
|
|
|
define <8 x i64>@test_int_x86_avx512_mask_vpmadd52l_uq_512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpmadd52l_uq_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2017-02-26 14:45:45 +08:00
|
|
|
; CHECK-NEXT: vmovdqa64 %zmm0, %zmm3
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmadd52luq %zmm2, %zmm1, %zmm3
|
2017-02-26 14:45:45 +08:00
|
|
|
; CHECK-NEXT: vmovdqa64 %zmm0, %zmm4
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmadd52luq %zmm2, %zmm1, %zmm4 {%k1}
|
2017-08-03 16:50:18 +08:00
|
|
|
; CHECK-NEXT: vpxor %xmm2, %xmm2, %xmm2
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: vpmadd52luq %zmm2, %zmm1, %zmm0 {%k1}
|
2017-05-19 02:50:05 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm0, %zmm4, %zmm0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpmadd52luq %zmm2, %zmm1, %zmm2 {%k1} {z}
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm2, %zmm3, %zmm1
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm0, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2016-07-21 22:36:41 +08:00
|
|
|
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52l.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52l.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52l.uq.512(<8 x i64> zeroinitializer, <8 x i64> %x1, <8 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52l.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 -1)
|
|
|
|
%res4 = add <8 x i64> %res, %res1
|
|
|
|
%res5 = add <8 x i64> %res3, %res2
|
|
|
|
%res6 = add <8 x i64> %res5, %res4
|
|
|
|
ret <8 x i64> %res6
|
|
|
|
}
|
|
|
|
|
|
|
|
declare <8 x i64> @llvm.x86.avx512.maskz.vpmadd52l.uq.512(<8 x i64>, <8 x i64>, <8 x i64>, i8)
|
|
|
|
|
|
|
|
define <8 x i64>@test_int_x86_avx512_maskz_vpmadd52l_uq_512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vpmadd52l_uq_512:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: kmovw %edi, %k1
|
2017-02-26 14:45:45 +08:00
|
|
|
; CHECK-NEXT: vmovdqa64 %zmm0, %zmm3
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmadd52luq %zmm2, %zmm1, %zmm3
|
2017-02-26 14:45:45 +08:00
|
|
|
; CHECK-NEXT: vmovdqa64 %zmm0, %zmm4
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpmadd52luq %zmm2, %zmm1, %zmm4 {%k1} {z}
|
2017-08-03 16:50:18 +08:00
|
|
|
; CHECK-NEXT: vpxor %xmm2, %xmm2, %xmm2
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: vpmadd52luq %zmm2, %zmm1, %zmm0 {%k1} {z}
|
2017-05-19 02:50:05 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm0, %zmm4, %zmm0
|
Add LiveRangeShrink pass to shrink live range within BB.
Summary: LiveRangeShrink pass moves instruction right after the definition with the same BB if the instruction and its operands all have more than one use. This pass is inexpensive and guarantees optimal live-range within BB.
Reviewers: davidxl, wmi, hfinkel, MatzeB, andreadb
Reviewed By: MatzeB, andreadb
Subscribers: hiraditya, jyknight, sanjoy, skatkov, gberry, jholewinski, qcolombet, javed.absar, krytarowski, atrick, spatel, RKSimon, andreadb, MatzeB, mehdi_amini, mgorny, efriedma, davide, dberlin, llvm-commits
Differential Revision: https://reviews.llvm.org/D32563
llvm-svn: 304371
2017-06-01 07:25:25 +08:00
|
|
|
; CHECK-NEXT: vpmadd52luq %zmm2, %zmm1, %zmm2 {%k1} {z}
|
2017-03-29 00:35:29 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm2, %zmm3, %zmm1
|
2017-02-26 14:45:43 +08:00
|
|
|
; CHECK-NEXT: vpaddq %zmm0, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
2016-07-21 22:36:41 +08:00
|
|
|
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52l.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
%res1 = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52l.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res2 = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52l.uq.512(<8 x i64> zeroinitializer, <8 x i64> %x1, <8 x i64> zeroinitializer, i8 %x3)
|
|
|
|
%res3 = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52l.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 -1)
|
|
|
|
%res4 = add <8 x i64> %res, %res1
|
|
|
|
%res5 = add <8 x i64> %res3, %res2
|
|
|
|
%res6 = add <8 x i64> %res5, %res4
|
|
|
|
ret <8 x i64> %res6
|
|
|
|
}
|
2017-09-25 01:28:14 +08:00
|
|
|
|
|
|
|
define <8 x i64>@test_int_x86_avx512_vpmadd52h_uq_512_load(<8 x i64> %x0, <8 x i64> %x1, <8 x i64>* %x2ptr) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_vpmadd52h_uq_512_load:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 01:28:14 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi), %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x2 = load <8 x i64>, <8 x i64>* %x2ptr
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 -1)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 03:30:54 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_vpmadd52h_uq_512_load_bcast(<8 x i64> %x0, <8 x i64> %x1, i64* %x2ptr) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_vpmadd52h_uq_512_load_bcast:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 03:30:54 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi){1to8}, %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x2load = load i64, i64* %x2ptr
|
|
|
|
%x2insert = insertelement <8 x i64> undef, i64 %x2load, i64 0
|
|
|
|
%x2 = shufflevector <8 x i64> %x2insert, <8 x i64> undef, <8 x i32> zeroinitializer
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 -1)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 01:28:14 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_vpmadd52h_uq_512_load_commute(<8 x i64> %x0, <8 x i64>* %x1ptr, <8 x i64> %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_vpmadd52h_uq_512_load_commute:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 01:28:14 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi), %zmm1, %zmm0
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x1 = load <8 x i64>, <8 x i64>* %x1ptr
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 -1)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 03:30:54 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_vpmadd52h_uq_512_load_commute_bcast(<8 x i64> %x0, i64* %x1ptr, <8 x i64> %x2) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_vpmadd52h_uq_512_load_commute_bcast:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 03:30:55 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi){1to8}, %zmm1, %zmm0
|
2017-09-25 03:30:54 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x1load = load i64, i64* %x1ptr
|
|
|
|
%x1insert = insertelement <8 x i64> undef, i64 %x1load, i64 0
|
|
|
|
%x1 = shufflevector <8 x i64> %x1insert, <8 x i64> undef, <8 x i32> zeroinitializer
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 -1)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 01:28:14 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_mask_vpmadd52h_uq_512_load(<8 x i64> %x0, <8 x i64> %x1, <8 x i64>* %x2ptr, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpmadd52h_uq_512_load:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 01:28:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1
|
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi), %zmm1, %zmm0 {%k1}
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x2 = load <8 x i64>, <8 x i64>* %x2ptr
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 03:30:54 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_mask_vpmadd52h_uq_512_load_bcast(<8 x i64> %x0, <8 x i64> %x1, i64* %x2ptr, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpmadd52h_uq_512_load_bcast:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 03:30:54 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1
|
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi){1to8}, %zmm1, %zmm0 {%k1}
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x2load = load i64, i64* %x2ptr
|
|
|
|
%x2insert = insertelement <8 x i64> undef, i64 %x2load, i64 0
|
|
|
|
%x2 = shufflevector <8 x i64> %x2insert, <8 x i64> undef, <8 x i32> zeroinitializer
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 01:28:14 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_mask_vpmadd52h_uq_512_load_commute(<8 x i64> %x0, <8 x i64>* %x1ptr, <8 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpmadd52h_uq_512_load_commute:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 01:28:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1
|
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi), %zmm1, %zmm0 {%k1}
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x1 = load <8 x i64>, <8 x i64>* %x1ptr
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 03:30:54 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_mask_vpmadd52h_uq_512_load_commute_bcast(<8 x i64> %x0, i64* %x1ptr, <8 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_mask_vpmadd52h_uq_512_load_commute_bcast:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 03:30:54 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1
|
2017-09-25 03:30:55 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi){1to8}, %zmm1, %zmm0 {%k1}
|
2017-09-25 03:30:54 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x1load = load i64, i64* %x1ptr
|
|
|
|
%x1insert = insertelement <8 x i64> undef, i64 %x1load, i64 0
|
|
|
|
%x1 = shufflevector <8 x i64> %x1insert, <8 x i64> undef, <8 x i32> zeroinitializer
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.mask.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 01:28:14 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_maskz_vpmadd52h_uq_512_load(<8 x i64> %x0, <8 x i64> %x1, <8 x i64>* %x2ptr, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vpmadd52h_uq_512_load:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 01:28:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1
|
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi), %zmm1, %zmm0 {%k1} {z}
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x2 = load <8 x i64>, <8 x i64>* %x2ptr
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 03:30:54 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_maskz_vpmadd52h_uq_512_load_bcast(<8 x i64> %x0, <8 x i64> %x1, i64* %x2ptr, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vpmadd52h_uq_512_load_bcast:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 03:30:54 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1
|
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi){1to8}, %zmm1, %zmm0 {%k1} {z}
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x2load = load i64, i64* %x2ptr
|
|
|
|
%x2insert = insertelement <8 x i64> undef, i64 %x2load, i64 0
|
|
|
|
%x2 = shufflevector <8 x i64> %x2insert, <8 x i64> undef, <8 x i32> zeroinitializer
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
|
|
|
|
2017-09-25 01:28:14 +08:00
|
|
|
define <8 x i64>@test_int_x86_avx512_maskz_vpmadd52h_uq_512_load_commute(<8 x i64> %x0, <8 x i64>* %x1ptr, <8 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vpmadd52h_uq_512_load_commute:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 01:28:14 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1
|
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi), %zmm1, %zmm0 {%k1} {z}
|
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x1 = load <8 x i64>, <8 x i64>* %x1ptr
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|
2017-09-25 03:30:54 +08:00
|
|
|
|
|
|
|
define <8 x i64>@test_int_x86_avx512_maskz_vpmadd52h_uq_512_load_commute_bcast(<8 x i64> %x0, i64* %x1ptr, <8 x i64> %x2, i8 %x3) {
|
|
|
|
; CHECK-LABEL: test_int_x86_avx512_maskz_vpmadd52h_uq_512_load_commute_bcast:
|
2017-12-05 01:18:51 +08:00
|
|
|
; CHECK: ## %bb.0:
|
2017-09-25 03:30:54 +08:00
|
|
|
; CHECK-NEXT: kmovw %esi, %k1
|
2017-09-25 03:30:55 +08:00
|
|
|
; CHECK-NEXT: vpmadd52huq (%rdi){1to8}, %zmm1, %zmm0 {%k1} {z}
|
2017-09-25 03:30:54 +08:00
|
|
|
; CHECK-NEXT: retq
|
|
|
|
|
|
|
|
%x1load = load i64, i64* %x1ptr
|
|
|
|
%x1insert = insertelement <8 x i64> undef, i64 %x1load, i64 0
|
|
|
|
%x1 = shufflevector <8 x i64> %x1insert, <8 x i64> undef, <8 x i32> zeroinitializer
|
|
|
|
%res = call <8 x i64> @llvm.x86.avx512.maskz.vpmadd52h.uq.512(<8 x i64> %x0, <8 x i64> %x1, <8 x i64> %x2, i8 %x3)
|
|
|
|
ret <8 x i64> %res
|
|
|
|
}
|