Skip to content

Commit cb80651

Browse files
committed
[RISCV] Merge AllBFloatVectors into AllFloatVectors. NFC.
1 parent b5f4fd0 commit cb80651

File tree

3 files changed

+7
-32
lines changed

3 files changed

+7
-32
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,13 @@ defset list<VTypeInfo> AllVectors = {
351351
def VF16MF4: VTypeInfo<vfloat16mf4_t, vbool64_t, 16, V_MF4, f16, FPR16>;
352352
def VF16MF2: VTypeInfo<vfloat16mf2_t, vbool32_t, 16, V_MF2, f16, FPR16>;
353353
def VF32MF2: VTypeInfo<vfloat32mf2_t, vbool64_t, 32, V_MF2, f32, FPR32>;
354+
def VBF16MF4: VTypeInfo<vbfloat16mf4_t, vbool64_t, 16, V_MF4, bf16, FPR16>;
355+
def VBF16MF2: VTypeInfo<vbfloat16mf2_t, vbool32_t, 16, V_MF2, bf16, FPR16>;
354356
}
355357
def VF16M1: VTypeInfo<vfloat16m1_t, vbool16_t, 16, V_M1, f16, FPR16>;
356358
def VF32M1: VTypeInfo<vfloat32m1_t, vbool32_t, 32, V_M1, f32, FPR32>;
357359
def VF64M1: VTypeInfo<vfloat64m1_t, vbool64_t, 64, V_M1, f64, FPR64>;
360+
def VBF16M1: VTypeInfo<vbfloat16m1_t, vbool16_t, 16, V_M1, bf16, FPR16>;
358361
}
359362

360363
defset list<GroupVTypeInfo> GroupFloatVectors = {
@@ -378,19 +381,7 @@ defset list<VTypeInfo> AllVectors = {
378381
V_M4, f64, FPR64>;
379382
def VF64M8: GroupVTypeInfo<vfloat64m8_t, vfloat64m1_t, vbool8_t, 64,
380383
V_M8, f64, FPR64>;
381-
}
382-
}
383384

384-
defset list<VTypeInfo> AllBFloatVectors = {
385-
defset list<VTypeInfo> NoGroupBFloatVectors = {
386-
defset list<VTypeInfo> FractionalGroupBFloatVectors = {
387-
def VBF16MF4: VTypeInfo<vbfloat16mf4_t, vbool64_t, 16, V_MF4, bf16, FPR16>;
388-
def VBF16MF2: VTypeInfo<vbfloat16mf2_t, vbool32_t, 16, V_MF2, bf16, FPR16>;
389-
}
390-
def VBF16M1: VTypeInfo<vbfloat16m1_t, vbool16_t, 16, V_M1, bf16, FPR16>;
391-
}
392-
393-
defset list<GroupVTypeInfo> GroupBFloatVectors = {
394385
def VBF16M2: GroupVTypeInfo<vbfloat16m2_t, vbfloat16m1_t, vbool8_t, 16,
395386
V_M2, bf16, FPR16>;
396387
def VBF16M4: GroupVTypeInfo<vbfloat16m4_t, vbfloat16m1_t, vbool4_t, 16,
@@ -7227,14 +7218,6 @@ foreach vti = AllFloatVectors in {
72277218
vti.RegClass, vti.ScalarRegClass>;
72287219
}
72297220

7230-
foreach vti = AllBFloatVectors in
7231-
let Predicates = [HasVInstructionsBF16Minimal] in
7232-
defm : VPatBinaryCarryInTAIL<"int_riscv_vmerge", "PseudoVMERGE", "VVM",
7233-
vti.Vector,
7234-
vti.Vector, vti.Vector, vti.Mask,
7235-
vti.Log2SEW, vti.LMul, vti.RegClass,
7236-
vti.RegClass, vti.RegClass>;
7237-
72387221
foreach fvti = AllFloatVectors in {
72397222
defvar instr = !cast<Instruction>("PseudoVMERGE_VIM_"#fvti.LMul.MX);
72407223
let Predicates = GetVTypePredicates<fvti>.Predicates in
@@ -7418,9 +7401,6 @@ defm : VPatTernaryV_VX_VI<"int_riscv_vslidedown", "PseudoVSLIDEDOWN", AllFloatVe
74187401
defm : VPatBinaryV_VX<"int_riscv_vfslide1up", "PseudoVFSLIDE1UP", AllFloatVectors>;
74197402
defm : VPatBinaryV_VX<"int_riscv_vfslide1down", "PseudoVFSLIDE1DOWN", AllFloatVectors>;
74207403

7421-
defm : VPatTernaryV_VX_VI<"int_riscv_vslideup", "PseudoVSLIDEUP", AllBFloatVectors, uimm5>;
7422-
defm : VPatTernaryV_VX_VI<"int_riscv_vslidedown", "PseudoVSLIDEDOWN", AllBFloatVectors, uimm5>;
7423-
74247404
//===----------------------------------------------------------------------===//
74257405
// 16.4. Vector Register Gather Instructions
74267406
//===----------------------------------------------------------------------===//
@@ -7431,18 +7411,13 @@ defm : VPatBinaryV_VV_INT_EEW<"int_riscv_vrgatherei16_vv", "PseudoVRGATHEREI16",
74317411

74327412
defm : VPatBinaryV_VV_VX_VI_INT<"int_riscv_vrgather", "PseudoVRGATHER",
74337413
AllFloatVectors, uimm5>;
7434-
defm : VPatBinaryV_VV_VX_VI_INT<"int_riscv_vrgather", "PseudoVRGATHER",
7435-
AllBFloatVectors, uimm5>;
74367414
defm : VPatBinaryV_VV_INT_EEW<"int_riscv_vrgatherei16_vv", "PseudoVRGATHEREI16",
74377415
eew=16, vtilist=AllFloatVectors>;
7438-
defm : VPatBinaryV_VV_INT_EEW<"int_riscv_vrgatherei16_vv", "PseudoVRGATHEREI16",
7439-
eew=16, vtilist=AllBFloatVectors>;
74407416
//===----------------------------------------------------------------------===//
74417417
// 16.5. Vector Compress Instruction
74427418
//===----------------------------------------------------------------------===//
74437419
defm : VPatUnaryV_V_AnyMask<"int_riscv_vcompress", "PseudoVCOMPRESS", AllIntegerVectors>;
74447420
defm : VPatUnaryV_V_AnyMask<"int_riscv_vcompress", "PseudoVCOMPRESS", AllFloatVectors>;
7445-
defm : VPatUnaryV_V_AnyMask<"int_riscv_vcompress", "PseudoVCOMPRESS", AllBFloatVectors>;
74467421

74477422
// Include the non-intrinsic ISel patterns
74487423
include "RISCVInstrInfoVVLPatterns.td"

llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,7 @@ defm : VPatFPSetCCSDNode_VV_VF_FV<SETOLE, "PseudoVMFLE", "PseudoVMFGE">;
13901390
// Floating-point vselects:
13911391
// 11.15. Vector Integer Merge Instructions
13921392
// 13.15. Vector Floating-Point Merge Instruction
1393-
foreach fvti = !listconcat(AllFloatVectors, AllBFloatVectors) in {
1393+
foreach fvti = AllFloatVectors in {
13941394
defvar ivti = GetIntVTypeInfo<fvti>.Vti;
13951395
let Predicates = GetVTypePredicates<ivti>.Predicates in {
13961396
def : Pat<(fvti.Vector (vselect (fvti.Mask VMV0:$vm), fvti.RegClass:$rs1,

llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2580,7 +2580,7 @@ foreach vti = AllFloatVectors in {
25802580
}
25812581
}
25822582

2583-
foreach fvti = !listconcat(AllFloatVectors, AllBFloatVectors) in {
2583+
foreach fvti = AllFloatVectors in {
25842584
// Floating-point vselects:
25852585
// 11.15. Vector Integer Merge Instructions
25862586
// 13.15. Vector Floating-Point Merge Instruction
@@ -2630,7 +2630,7 @@ foreach fvti = AllFloatVectors in {
26302630
}
26312631
}
26322632

2633-
foreach fvti = !listconcat(AllFloatVectors, AllBFloatVectors) in {
2633+
foreach fvti = AllFloatVectors in {
26342634
defvar ivti = GetIntVTypeInfo<fvti>.Vti;
26352635
let Predicates = GetVTypePredicates<ivti>.Predicates in {
26362636
// 13.16. Vector Floating-Point Move Instruction
@@ -2954,7 +2954,7 @@ foreach vti = NoGroupFloatVectors in {
29542954
}
29552955
}
29562956

2957-
foreach vti = !listconcat(AllFloatVectors, AllBFloatVectors) in {
2957+
foreach vti = AllFloatVectors in {
29582958
defvar ivti = GetIntVTypeInfo<vti>.Vti;
29592959
let Predicates = GetVTypePredicates<ivti>.Predicates in {
29602960
def : Pat<(vti.Vector

0 commit comments

Comments
 (0)