Skip to content

Commit c759627

Browse files
committed
Address Roland's concern that XXMTACC/XXMFACC are awkward and probably
not handled properly. They have been superseded by new instructions that can do the same thing, so we don't actually want to create them.
1 parent 671c9b1 commit c759627

File tree

3 files changed

+21
-23
lines changed

3 files changed

+21
-23
lines changed

llvm/lib/Target/PowerPC/PPCInstrMMA.td

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -535,25 +535,25 @@ let Predicates = [MMA, IsNotISAFuture] in {
535535
}
536536

537537
let Predicates = [MMA, IsISAFuture], isCodeGenOnly = 1 in {
538+
// For Future and up XXMFACCW and XXMTACCW will not have patterns.
538539
// On Future CPU the wacc registers no longer overlap with the vsr registers
539-
// so register allocation need to match 4 vsr registers with one wacc
540-
// register. XXMTACC/XXFACC will be aliased to these new instructions.
541-
def DMXXMFACC:
542-
XForm_AT3<31, 0, 177, (outs wacc:$ATo), (ins wacc:$AT), "dmxxmfacc $AT",
543-
IIC_VecGeneral,
544-
[(set v512i1:$ATo, (int_ppc_mma_xxmfacc v512i1:$AT))]>,
540+
// and so register allocation would have to know to match 4 vsr registers
541+
// with one wacc register.
542+
// On top of that Future CPU has a more convenient way to move between vsrs
543+
// and wacc registers using xxextfdmr512 and xxinstdmr512.
544+
def XXMFACCW :
545+
XForm_AT3<31, 0, 177, (outs wacc:$ATo), (ins wacc:$AT), "xxmfacc $AT",
546+
IIC_VecGeneral, []>,
545547
RegConstraint<"$ATo = $AT">, NoEncode<"$ATo">;
546-
def DMXXMTACC:
547-
XForm_AT3<31, 1, 177, (outs wacc:$AT), (ins wacc:$ATi), "dmxxmtacc $AT",
548-
IIC_VecGeneral,
549-
[(set v512i1:$AT, (int_ppc_mma_xxmtacc v512i1:$ATi))]>,
548+
def XXMTACCW :
549+
XForm_AT3<31, 1, 177, (outs wacc:$AT), (ins wacc:$ATi), "xxmtacc $AT",
550+
IIC_VecGeneral, []>,
550551
RegConstraint<"$ATi = $AT">, NoEncode<"$ATi">;
551552

552553
let isAsCheapAsAMove = 1, isReMaterializable = 1 in {
553-
def DMXXSETACCZ:
554+
def DMXXSETACCZ :
554555
XForm_AT3<31, 3, 177, (outs wacc:$AT), (ins), "dmxxsetaccz $AT",
555-
IIC_VecGeneral,
556-
[(set v512i1:$AT, (int_ppc_mma_xxsetaccz))]>;
556+
IIC_VecGeneral, [(set v512i1:$AT, (int_ppc_mma_xxsetaccz))]>;
557557
}
558558

559559
def XVI8GER4WSPP :

llvm/lib/Target/PowerPC/PPCRegisterInfo.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ def sub_64 : SubRegIndex<64>;
2020
def sub_64_hi_phony : SubRegIndex<64,64>;
2121
def sub_vsx0 : SubRegIndex<128>;
2222
def sub_vsx1 : SubRegIndex<128, 128>;
23-
def sub_vsx2 : ComposedSubRegIndex<sub_vsx1, sub_vsx0>;
24-
def sub_vsx3 : ComposedSubRegIndex<sub_vsx2, sub_vsx0>;
2523
def sub_gp8_x0 : SubRegIndex<64>;
2624
def sub_gp8_x1 : SubRegIndex<64, 64>;
2725
def sub_fp0 : SubRegIndex<64>;

llvm/test/CodeGen/PowerPC/subreg-lanemasks.mir

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
# Keep track of all of the lanemasks for various subregsiters.
77
#
88
# CHECK: %3 [80r,80d:0) 0@80r L000000000000000C [80r,80d:0) 0@80r weight:0.000000e+00
9-
# CHECK: %4 [96r,96d:0) 0@96r L0000000000007000 [96r,96d:0) 0@96r weight:0.000000e+00
9+
# CHECK: %4 [96r,96d:0) 0@96r L0000000000003000 [96r,96d:0) 0@96r weight:0.000000e+00
1010
# CHECK: %5 [112r,112d:0) 0@112r L000000000000000C [112r,112d:0) 0@112r weight:0.000000e+00
11-
# CHECK: %6 [128r,128d:0) 0@128r L0000000000007000 [128r,128d:0) 0@128r weight:0.000000e+00
11+
# CHECK: %6 [128r,128d:0) 0@128r L0000000000003000 [128r,128d:0) 0@128r weight:0.000000e+00
1212
# CHECK: %7 [144r,144d:0) 0@144r L0000000000000004 [144r,144d:0) 0@144r weight:0.000000e+00
13-
# CHECK: %8 [160r,160d:0) 0@160r L0000000000002000 [160r,160d:0) 0@160r weight:0.000000e+00
13+
# CHECK: %8 [160r,160d:0) 0@160r L0000000000001000 [160r,160d:0) 0@160r weight:0.000000e+00
1414
# CHECK: %9 [176r,176d:0) 0@176r L0000000000000004 [176r,176d:0) 0@176r weight:0.000000e+00
15-
# CHECK: %10 [192r,192d:0) 0@192r L0000000000002000 [192r,192d:0) 0@192r weight:0.000000e+00
16-
# CHECK: %11 [208r,208d:0) 0@208r L0000000000008000 [208r,208d:0) 0@208r weight:0.000000e+00
17-
# CHECK: %12 [224r,224d:0) 0@224r L0000000000020000 [224r,224d:0) 0@224r weight:0.000000e+00
18-
# CHECK: %13 [240r,240d:0) 0@240r L000000000000700C [240r,240d:0) 0@240r weight:0.000000e+00
19-
# CHECK: %14 [256r,256d:0) 0@256r L0000000000078000 [256r,256d:0) 0@256r weight:0.000000e+00
15+
# CHECK: %10 [192r,192d:0) 0@192r L0000000000001000 [192r,192d:0) 0@192r weight:0.000000e+00
16+
# CHECK: %11 [208r,208d:0) 0@208r L0000000000004000 [208r,208d:0) 0@208r weight:0.000000e+00
17+
# CHECK: %12 [224r,224d:0) 0@224r L0000000000010000 [224r,224d:0) 0@224r weight:0.000000e+00
18+
# CHECK: %13 [240r,240d:0) 0@240r L000000000000300C [240r,240d:0) 0@240r weight:0.000000e+00
19+
# CHECK: %14 [256r,256d:0) 0@256r L000000000003C000 [256r,256d:0) 0@256r weight:0.000000e+00
2020

2121

2222
# CHECK: 0B bb.0

0 commit comments

Comments
 (0)