[llvm] 8f0343c - [RISCV] Use tail agnostic policy for fixed vector vwmacc(u).
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 16 10:44:59 PDT 2021
Author: Craig Topper
Date: 2021-07-16T10:41:09-07:00
New Revision: 8f0343cc9c1625e2a1560a2b2553ccb81ff605f9
URL: https://github.com/llvm/llvm-project/commit/8f0343cc9c1625e2a1560a2b2553ccb81ff605f9
DIFF: https://github.com/llvm/llvm-project/commit/8f0343cc9c1625e2a1560a2b2553ccb81ff605f9.diff
LOG: [RISCV] Use tail agnostic policy for fixed vector vwmacc(u).
This adds new pseudoinstructions with ForceTailAgnostic set. This
matches what we did for non-widening VMACC. We should move to a
tail policy operand on the pseudos when we expand the intrinsic
interface to include the tail policy.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwacc.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwaccu.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
index 6d21d7f55bc59..0284ff6d1c6b3 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
@@ -578,11 +578,12 @@ class PseudoToVInst<string PseudoInst> {
!subst("_B64", "",
!subst("_MASK", "",
!subst("_COMMUTABLE", "",
+ !subst("_TA", "",
!subst("_TIED", "",
!subst("F16", "F",
!subst("F32", "F",
!subst("F64", "F",
- !subst("Pseudo", "", PseudoInst)))))))))))))))))))));
+ !subst("Pseudo", "", PseudoInst))))))))))))))))))))));
}
// The destination vector register group for a masked vector instruction cannot
@@ -1931,22 +1932,42 @@ multiclass VPseudoTernaryV_VF_AAXA<string Constraint = ""> {
multiclass VPseudoTernaryW_VV {
defvar constraint = "@earlyclobber $rd";
- foreach m = MxListW.m in
+ foreach m = MxListW.m in {
defm _VV : VPseudoTernary<m.wvrclass, m.vrclass, m.vrclass, m, constraint>;
+
+ // Add a tail agnostic version for us by IR mul+add.
+ let ForceTailAgnostic = true, VLMul = m.value in
+ def "_VV_" # m.MX # "_TA" : VPseudoTernaryNoMask<m.wvrclass,
+ m.vrclass,
+ m.vrclass,
+ constraint>;
+ }
}
multiclass VPseudoTernaryW_VX {
defvar constraint = "@earlyclobber $rd";
- foreach m = MxListW.m in
+ foreach m = MxListW.m in {
defm "_VX" : VPseudoTernary<m.wvrclass, GPR, m.vrclass, m, constraint>;
+
+ // Add a tail agnostic version for use by IR mul+add.
+ let ForceTailAgnostic = true, VLMul = m.value in
+ def "_VX_" # m.MX # "_TA" :
+ VPseudoTernaryNoMask<m.wvrclass, GPR, m.vrclass, constraint>;
+ }
}
multiclass VPseudoTernaryW_VF {
defvar constraint = "@earlyclobber $rd";
foreach m = MxListW.m in
- foreach f = FPListW.fpinfo in
+ foreach f = FPListW.fpinfo in {
defm "_V" # f.FX : VPseudoTernary<m.wvrclass, f.fprclass, m.vrclass, m,
constraint>;
+
+ // Add a tail agnostic version for use by IR mul+add.
+ let ForceTailAgnostic = true, VLMul = m.value in
+ def "_V" # f.FX # "_" # m.MX # "_TA" :
+ VPseudoTernaryNoMask<m.vrclass, f.fprclass, m.vrclass, constraint>;
+ }
}
multiclass VPseudoTernaryV_VI<Operand ImmType = simm5, string Constraint = ""> {
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
index c2bc27b6bddd4..2893b236316dc 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
@@ -833,7 +833,7 @@ foreach vtiTowti = AllWidenableIntVectors in {
(vti.Vector vti.RegClass:$rs2),
(vti.Mask true_mask), VLOpFrag),
(vti.Mask true_mask), VLOpFrag)),
- (!cast<Instruction>("PseudoVWMACC_VV_"# vti.LMul.MX)
+ (!cast<Instruction>("PseudoVWMACC_VV_" # vti.LMul.MX # "_TA")
wti.RegClass:$rd, vti.RegClass:$rs1, vti.RegClass:$rs2,
GPR:$vl, vti.Log2SEW)>;
def : Pat<(wti.Vector
@@ -842,7 +842,7 @@ foreach vtiTowti = AllWidenableIntVectors in {
(vti.Vector vti.RegClass:$rs2),
(vti.Mask true_mask), VLOpFrag),
(vti.Mask true_mask), VLOpFrag)),
- (!cast<Instruction>("PseudoVWMACCU_VV_"# vti.LMul.MX)
+ (!cast<Instruction>("PseudoVWMACCU_VV_" # vti.LMul.MX # "_TA")
wti.RegClass:$rd, vti.RegClass:$rs1, vti.RegClass:$rs2,
GPR:$vl, vti.Log2SEW)>;
@@ -852,7 +852,7 @@ foreach vtiTowti = AllWidenableIntVectors in {
(vti.Vector vti.RegClass:$rs2),
(vti.Mask true_mask), VLOpFrag),
(vti.Mask true_mask), VLOpFrag)),
- (!cast<Instruction>("PseudoVWMACC_VX_" # vti.LMul.MX)
+ (!cast<Instruction>("PseudoVWMACC_VX_" # vti.LMul.MX # "_TA")
wti.RegClass:$rd, vti.ScalarRegClass:$rs1, vti.RegClass:$rs2,
GPR:$vl, vti.Log2SEW)>;
def : Pat<(wti.Vector
@@ -861,7 +861,7 @@ foreach vtiTowti = AllWidenableIntVectors in {
(vti.Vector vti.RegClass:$rs2),
(vti.Mask true_mask), VLOpFrag),
(vti.Mask true_mask), VLOpFrag)),
- (!cast<Instruction>("PseudoVWMACCU_VX_" # vti.LMul.MX)
+ (!cast<Instruction>("PseudoVWMACCU_VX_" # vti.LMul.MX # "_TA")
wti.RegClass:$rd, vti.ScalarRegClass:$rs1, vti.RegClass:$rs2,
GPR:$vl, vti.Log2SEW)>;
}
diff --git a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwacc.ll b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwacc.ll
index 4970db842c9bc..bd1b3e5e2c527 100644
--- a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwacc.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwacc.ll
@@ -8,7 +8,6 @@ define <2 x i16> @vwmacc_v2i16(<2 x i8>* %x, <2 x i8>* %y, <2 x i16> %z) {
; CHECK-NEXT: vsetivli zero, 2, e8, mf8, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
; CHECK-NEXT: vle8.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf8, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <2 x i8>, <2 x i8>* %x
@@ -26,7 +25,6 @@ define <4 x i16> @vwmacc_v4i16(<4 x i8>* %x, <4 x i8>* %y, <4 x i16> %z) {
; CHECK-NEXT: vsetivli zero, 4, e8, mf4, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
; CHECK-NEXT: vle8.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf4, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <4 x i8>, <4 x i8>* %x
@@ -44,7 +42,6 @@ define <2 x i32> @vwmacc_v2i32(<2 x i16>* %x, <2 x i16>* %y, <2 x i32> %z) {
; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
; CHECK-NEXT: vle16.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, mf4, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <2 x i16>, <2 x i16>* %x
@@ -62,7 +59,6 @@ define <8 x i16> @vwmacc_v8i16(<8 x i8>* %x, <8 x i8>* %y, <8 x i16> %z) {
; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
; CHECK-NEXT: vle8.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf2, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <8 x i8>, <8 x i8>* %x
@@ -80,7 +76,6 @@ define <4 x i32> @vwmacc_v4i32(<4 x i16>* %x, <4 x i16>* %y, <4 x i32> %z) {
; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
; CHECK-NEXT: vle16.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, mf2, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <4 x i16>, <4 x i16>* %x
@@ -98,7 +93,6 @@ define <2 x i64> @vwmacc_v2i64(<2 x i32>* %x, <2 x i32>* %y, <2 x i64> %z) {
; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu
; CHECK-NEXT: vle32.v v25, (a0)
; CHECK-NEXT: vle32.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e32, mf2, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <2 x i32>, <2 x i32>* %x
@@ -116,7 +110,6 @@ define <16 x i16> @vwmacc_v16i16(<16 x i8>* %x, <16 x i8>* %y, <16 x i16> %z) {
; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
; CHECK-NEXT: vle8.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, m1, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <16 x i8>, <16 x i8>* %x
@@ -134,7 +127,6 @@ define <8 x i32> @vwmacc_v8i32(<8 x i16>* %x, <8 x i16>* %y, <8 x i32> %z) {
; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
; CHECK-NEXT: vle16.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, m1, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <8 x i16>, <8 x i16>* %x
@@ -152,7 +144,6 @@ define <4 x i64> @vwmacc_v4i64(<4 x i32>* %x, <4 x i32>* %y, <4 x i64> %z) {
; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu
; CHECK-NEXT: vle32.v v25, (a0)
; CHECK-NEXT: vle32.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e32, m1, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <4 x i32>, <4 x i32>* %x
@@ -171,7 +162,6 @@ define <32 x i16> @vwmacc_v32i16(<32 x i8>* %x, <32 x i8>* %y, <32 x i16> %z) {
; CHECK-NEXT: vsetvli zero, a2, e8, m2, ta, mu
; CHECK-NEXT: vle8.v v26, (a0)
; CHECK-NEXT: vle8.v v28, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, m2, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v26, v28
; CHECK-NEXT: ret
%a = load <32 x i8>, <32 x i8>* %x
@@ -189,7 +179,6 @@ define <16 x i32> @vwmacc_v16i32(<16 x i16>* %x, <16 x i16>* %y, <16 x i32> %z)
; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu
; CHECK-NEXT: vle16.v v26, (a0)
; CHECK-NEXT: vle16.v v28, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, m2, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v26, v28
; CHECK-NEXT: ret
%a = load <16 x i16>, <16 x i16>* %x
@@ -207,7 +196,6 @@ define <8 x i64> @vwmacc_v8i64(<8 x i32>* %x, <8 x i32>* %y, <8 x i64> %z) {
; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu
; CHECK-NEXT: vle32.v v26, (a0)
; CHECK-NEXT: vle32.v v28, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e32, m2, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v26, v28
; CHECK-NEXT: ret
%a = load <8 x i32>, <8 x i32>* %x
@@ -226,7 +214,6 @@ define <64 x i16> @vwmacc_v64i16(<64 x i8>* %x, <64 x i8>* %y, <64 x i16> %z) {
; CHECK-NEXT: vsetvli zero, a2, e8, m4, ta, mu
; CHECK-NEXT: vle8.v v28, (a0)
; CHECK-NEXT: vle8.v v16, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, m4, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v28, v16
; CHECK-NEXT: ret
%a = load <64 x i8>, <64 x i8>* %x
@@ -245,7 +232,6 @@ define <32 x i32> @vwmacc_v32i32(<32 x i16>* %x, <32 x i16>* %y, <32 x i32> %z)
; CHECK-NEXT: vsetvli zero, a2, e16, m4, ta, mu
; CHECK-NEXT: vle16.v v28, (a0)
; CHECK-NEXT: vle16.v v16, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, m4, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v28, v16
; CHECK-NEXT: ret
%a = load <32 x i16>, <32 x i16>* %x
@@ -263,7 +249,6 @@ define <16 x i64> @vwmacc_v16i64(<16 x i32>* %x, <16 x i32>* %y, <16 x i64> %z)
; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu
; CHECK-NEXT: vle32.v v28, (a0)
; CHECK-NEXT: vle32.v v16, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e32, m4, tu, mu
; CHECK-NEXT: vwmacc.vv v8, v28, v16
; CHECK-NEXT: ret
%a = load <16 x i32>, <16 x i32>* %x
@@ -280,7 +265,6 @@ define <2 x i16> @vwmacc_vx_v2i16(<2 x i8>* %x, i8 %y, <2 x i16> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 2, e8, mf8, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf8, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <2 x i8>, <2 x i8>* %x
@@ -298,7 +282,6 @@ define <4 x i16> @vwmacc_vx_v4i16(<4 x i8>* %x, i8 %y, <4 x i16> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 4, e8, mf4, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf4, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <4 x i8>, <4 x i8>* %x
@@ -316,7 +299,6 @@ define <2 x i32> @vwmacc_vx_v2i32(<2 x i16>* %x, i16 %y, <2 x i32> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, mf4, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <2 x i16>, <2 x i16>* %x
@@ -334,7 +316,6 @@ define <8 x i16> @vwmacc_vx_v8i16(<8 x i8>* %x, i8 %y, <8 x i16> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf2, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <8 x i8>, <8 x i8>* %x
@@ -352,7 +333,6 @@ define <4 x i32> @vwmacc_vx_v4i32(<4 x i16>* %x, i16 %y, <4 x i32> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, mf2, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <4 x i16>, <4 x i16>* %x
@@ -370,7 +350,6 @@ define <2 x i64> @vwmacc_vx_v2i64(<2 x i32>* %x, i32 %y, <2 x i64> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu
; CHECK-NEXT: vle32.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e32, mf2, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <2 x i32>, <2 x i32>* %x
@@ -388,7 +367,6 @@ define <16 x i16> @vwmacc_vx_v16i16(<16 x i8>* %x, i8 %y, <16 x i16> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, m1, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <16 x i8>, <16 x i8>* %x
@@ -406,7 +384,6 @@ define <8 x i32> @vwmacc_vx_v8i32(<8 x i16>* %x, i16 %y, <8 x i32> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, m1, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <8 x i16>, <8 x i16>* %x
@@ -424,7 +401,6 @@ define <4 x i64> @vwmacc_vx_v4i64(<4 x i32>* %x, i32 %y, <4 x i64> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu
; CHECK-NEXT: vle32.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e32, m1, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <4 x i32>, <4 x i32>* %x
@@ -443,7 +419,6 @@ define <32 x i16> @vwmacc_vx_v32i16(<32 x i8>* %x, i8 %y, <32 x i16> %z) {
; CHECK-NEXT: addi a2, zero, 32
; CHECK-NEXT: vsetvli zero, a2, e8, m2, ta, mu
; CHECK-NEXT: vle8.v v26, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, m2, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v26
; CHECK-NEXT: ret
%a = load <32 x i8>, <32 x i8>* %x
@@ -461,7 +436,6 @@ define <16 x i32> @vwmacc_vx_v16i32(<16 x i16>* %x, i16 %y, <16 x i32> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu
; CHECK-NEXT: vle16.v v26, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, m2, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v26
; CHECK-NEXT: ret
%a = load <16 x i16>, <16 x i16>* %x
@@ -479,7 +453,6 @@ define <8 x i64> @vwmacc_vx_v8i64(<8 x i32>* %x, i32 %y, <8 x i64> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu
; CHECK-NEXT: vle32.v v26, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e32, m2, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v26
; CHECK-NEXT: ret
%a = load <8 x i32>, <8 x i32>* %x
@@ -498,7 +471,6 @@ define <64 x i16> @vwmacc_vx_v64i16(<64 x i8>* %x, i8 %y, <64 x i16> %z) {
; CHECK-NEXT: addi a2, zero, 64
; CHECK-NEXT: vsetvli zero, a2, e8, m4, ta, mu
; CHECK-NEXT: vle8.v v28, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, m4, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v28
; CHECK-NEXT: ret
%a = load <64 x i8>, <64 x i8>* %x
@@ -517,7 +489,6 @@ define <32 x i32> @vwmacc_vx_v32i32(<32 x i16>* %x, i16 %y, <32 x i32> %z) {
; CHECK-NEXT: addi a2, zero, 32
; CHECK-NEXT: vsetvli zero, a2, e16, m4, ta, mu
; CHECK-NEXT: vle16.v v28, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, m4, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v28
; CHECK-NEXT: ret
%a = load <32 x i16>, <32 x i16>* %x
@@ -535,7 +506,6 @@ define <16 x i64> @vwmacc_vx_v16i64(<16 x i32>* %x, i32 %y, <16 x i64> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu
; CHECK-NEXT: vle32.v v28, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e32, m4, tu, mu
; CHECK-NEXT: vwmacc.vx v8, a1, v28
; CHECK-NEXT: ret
%a = load <16 x i32>, <16 x i32>* %x
diff --git a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwaccu.ll b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwaccu.ll
index ccd87701d92dc..9cae8d23ef6f6 100644
--- a/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwaccu.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwaccu.ll
@@ -8,7 +8,6 @@ define <2 x i16> @vwmaccu_v2i16(<2 x i8>* %x, <2 x i8>* %y, <2 x i16> %z) {
; CHECK-NEXT: vsetivli zero, 2, e8, mf8, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
; CHECK-NEXT: vle8.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf8, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <2 x i8>, <2 x i8>* %x
@@ -26,7 +25,6 @@ define <4 x i16> @vwmaccu_v4i16(<4 x i8>* %x, <4 x i8>* %y, <4 x i16> %z) {
; CHECK-NEXT: vsetivli zero, 4, e8, mf4, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
; CHECK-NEXT: vle8.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf4, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <4 x i8>, <4 x i8>* %x
@@ -44,7 +42,6 @@ define <2 x i32> @vwmaccu_v2i32(<2 x i16>* %x, <2 x i16>* %y, <2 x i32> %z) {
; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
; CHECK-NEXT: vle16.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, mf4, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <2 x i16>, <2 x i16>* %x
@@ -62,7 +59,6 @@ define <8 x i16> @vwmaccu_v8i16(<8 x i8>* %x, <8 x i8>* %y, <8 x i16> %z) {
; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
; CHECK-NEXT: vle8.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf2, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <8 x i8>, <8 x i8>* %x
@@ -80,7 +76,6 @@ define <4 x i32> @vwmaccu_v4i32(<4 x i16>* %x, <4 x i16>* %y, <4 x i32> %z) {
; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
; CHECK-NEXT: vle16.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, mf2, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <4 x i16>, <4 x i16>* %x
@@ -98,7 +93,6 @@ define <2 x i64> @vwmaccu_v2i64(<2 x i32>* %x, <2 x i32>* %y, <2 x i64> %z) {
; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu
; CHECK-NEXT: vle32.v v25, (a0)
; CHECK-NEXT: vle32.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e32, mf2, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <2 x i32>, <2 x i32>* %x
@@ -116,7 +110,6 @@ define <16 x i16> @vwmaccu_v16i16(<16 x i8>* %x, <16 x i8>* %y, <16 x i16> %z) {
; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
; CHECK-NEXT: vle8.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, m1, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <16 x i8>, <16 x i8>* %x
@@ -134,7 +127,6 @@ define <8 x i32> @vwmaccu_v8i32(<8 x i16>* %x, <8 x i16>* %y, <8 x i32> %z) {
; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
; CHECK-NEXT: vle16.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, m1, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <8 x i16>, <8 x i16>* %x
@@ -152,7 +144,6 @@ define <4 x i64> @vwmaccu_v4i64(<4 x i32>* %x, <4 x i32>* %y, <4 x i64> %z) {
; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu
; CHECK-NEXT: vle32.v v25, (a0)
; CHECK-NEXT: vle32.v v26, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e32, m1, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v25, v26
; CHECK-NEXT: ret
%a = load <4 x i32>, <4 x i32>* %x
@@ -171,7 +162,6 @@ define <32 x i16> @vwmaccu_v32i16(<32 x i8>* %x, <32 x i8>* %y, <32 x i16> %z) {
; CHECK-NEXT: vsetvli zero, a2, e8, m2, ta, mu
; CHECK-NEXT: vle8.v v26, (a0)
; CHECK-NEXT: vle8.v v28, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, m2, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v26, v28
; CHECK-NEXT: ret
%a = load <32 x i8>, <32 x i8>* %x
@@ -189,7 +179,6 @@ define <16 x i32> @vwmaccu_v16i32(<16 x i16>* %x, <16 x i16>* %y, <16 x i32> %z)
; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu
; CHECK-NEXT: vle16.v v26, (a0)
; CHECK-NEXT: vle16.v v28, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, m2, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v26, v28
; CHECK-NEXT: ret
%a = load <16 x i16>, <16 x i16>* %x
@@ -207,7 +196,6 @@ define <8 x i64> @vwmaccu_v8i64(<8 x i32>* %x, <8 x i32>* %y, <8 x i64> %z) {
; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu
; CHECK-NEXT: vle32.v v26, (a0)
; CHECK-NEXT: vle32.v v28, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e32, m2, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v26, v28
; CHECK-NEXT: ret
%a = load <8 x i32>, <8 x i32>* %x
@@ -226,7 +214,6 @@ define <64 x i16> @vwmaccu_v64i16(<64 x i8>* %x, <64 x i8>* %y, <64 x i16> %z) {
; CHECK-NEXT: vsetvli zero, a2, e8, m4, ta, mu
; CHECK-NEXT: vle8.v v28, (a0)
; CHECK-NEXT: vle8.v v16, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e8, m4, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v28, v16
; CHECK-NEXT: ret
%a = load <64 x i8>, <64 x i8>* %x
@@ -245,7 +232,6 @@ define <32 x i32> @vwmaccu_v32i32(<32 x i16>* %x, <32 x i16>* %y, <32 x i32> %z)
; CHECK-NEXT: vsetvli zero, a2, e16, m4, ta, mu
; CHECK-NEXT: vle16.v v28, (a0)
; CHECK-NEXT: vle16.v v16, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e16, m4, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v28, v16
; CHECK-NEXT: ret
%a = load <32 x i16>, <32 x i16>* %x
@@ -263,7 +249,6 @@ define <16 x i64> @vwmaccu_v16i64(<16 x i32>* %x, <16 x i32>* %y, <16 x i64> %z)
; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu
; CHECK-NEXT: vle32.v v28, (a0)
; CHECK-NEXT: vle32.v v16, (a1)
-; CHECK-NEXT: vsetvli zero, zero, e32, m4, tu, mu
; CHECK-NEXT: vwmaccu.vv v8, v28, v16
; CHECK-NEXT: ret
%a = load <16 x i32>, <16 x i32>* %x
@@ -280,7 +265,6 @@ define <2 x i16> @vwmaccu_vx_v2i16(<2 x i8>* %x, i8 %y, <2 x i16> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 2, e8, mf8, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf8, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <2 x i8>, <2 x i8>* %x
@@ -298,7 +282,6 @@ define <4 x i16> @vwmaccu_vx_v4i16(<4 x i8>* %x, i8 %y, <4 x i16> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 4, e8, mf4, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf4, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <4 x i8>, <4 x i8>* %x
@@ -316,7 +299,6 @@ define <2 x i32> @vwmaccu_vx_v2i32(<2 x i16>* %x, i16 %y, <2 x i32> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, mf4, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <2 x i16>, <2 x i16>* %x
@@ -334,7 +316,6 @@ define <8 x i16> @vwmaccu_vx_v8i16(<8 x i8>* %x, i8 %y, <8 x i16> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, mf2, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <8 x i8>, <8 x i8>* %x
@@ -352,7 +333,6 @@ define <4 x i32> @vwmaccu_vx_v4i32(<4 x i16>* %x, i16 %y, <4 x i32> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, mf2, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <4 x i16>, <4 x i16>* %x
@@ -370,7 +350,6 @@ define <2 x i64> @vwmaccu_vx_v2i64(<2 x i32>* %x, i32 %y, <2 x i64> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, mu
; CHECK-NEXT: vle32.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e32, mf2, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <2 x i32>, <2 x i32>* %x
@@ -388,7 +367,6 @@ define <16 x i16> @vwmaccu_vx_v16i16(<16 x i8>* %x, i8 %y, <16 x i16> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, mu
; CHECK-NEXT: vle8.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, m1, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <16 x i8>, <16 x i8>* %x
@@ -406,7 +384,6 @@ define <8 x i32> @vwmaccu_vx_v8i32(<8 x i16>* %x, i16 %y, <8 x i32> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, mu
; CHECK-NEXT: vle16.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, m1, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <8 x i16>, <8 x i16>* %x
@@ -424,7 +401,6 @@ define <4 x i64> @vwmaccu_vx_v4i64(<4 x i32>* %x, i32 %y, <4 x i64> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, mu
; CHECK-NEXT: vle32.v v25, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e32, m1, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v25
; CHECK-NEXT: ret
%a = load <4 x i32>, <4 x i32>* %x
@@ -443,7 +419,6 @@ define <32 x i16> @vwmaccu_vx_v32i16(<32 x i8>* %x, i8 %y, <32 x i16> %z) {
; CHECK-NEXT: addi a2, zero, 32
; CHECK-NEXT: vsetvli zero, a2, e8, m2, ta, mu
; CHECK-NEXT: vle8.v v26, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, m2, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v26
; CHECK-NEXT: ret
%a = load <32 x i8>, <32 x i8>* %x
@@ -461,7 +436,6 @@ define <16 x i32> @vwmaccu_vx_v16i32(<16 x i16>* %x, i16 %y, <16 x i32> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, mu
; CHECK-NEXT: vle16.v v26, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, m2, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v26
; CHECK-NEXT: ret
%a = load <16 x i16>, <16 x i16>* %x
@@ -479,7 +453,6 @@ define <8 x i64> @vwmaccu_vx_v8i64(<8 x i32>* %x, i32 %y, <8 x i64> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, mu
; CHECK-NEXT: vle32.v v26, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e32, m2, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v26
; CHECK-NEXT: ret
%a = load <8 x i32>, <8 x i32>* %x
@@ -498,7 +471,6 @@ define <64 x i16> @vwmaccu_vx_v64i16(<64 x i8>* %x, i8 %y, <64 x i16> %z) {
; CHECK-NEXT: addi a2, zero, 64
; CHECK-NEXT: vsetvli zero, a2, e8, m4, ta, mu
; CHECK-NEXT: vle8.v v28, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e8, m4, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v28
; CHECK-NEXT: ret
%a = load <64 x i8>, <64 x i8>* %x
@@ -517,7 +489,6 @@ define <32 x i32> @vwmaccu_vx_v32i32(<32 x i16>* %x, i16 %y, <32 x i32> %z) {
; CHECK-NEXT: addi a2, zero, 32
; CHECK-NEXT: vsetvli zero, a2, e16, m4, ta, mu
; CHECK-NEXT: vle16.v v28, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e16, m4, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v28
; CHECK-NEXT: ret
%a = load <32 x i16>, <32 x i16>* %x
@@ -535,7 +506,6 @@ define <16 x i64> @vwmaccu_vx_v16i64(<16 x i32>* %x, i32 %y, <16 x i64> %z) {
; CHECK: # %bb.0:
; CHECK-NEXT: vsetivli zero, 16, e32, m4, ta, mu
; CHECK-NEXT: vle32.v v28, (a0)
-; CHECK-NEXT: vsetvli zero, zero, e32, m4, tu, mu
; CHECK-NEXT: vwmaccu.vx v8, a1, v28
; CHECK-NEXT: ret
%a = load <16 x i32>, <16 x i32>* %x
More information about the llvm-commits
mailing list