Skip to content

Commit d7a81fc

Browse files
committed
Add missing predicates and move the MMA mask immediate defs to PPCInstrInfo.td
1 parent 42a3b4d commit d7a81fc

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

llvm/lib/Target/PowerPC/PPCInstrFutureMMA.td

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@
1111
//
1212
//===----------------------------------------------------------------------===//
1313

14-
// Mask immediates for MMA instructions (2, 4 and 8 bits).
15-
def Msk2Imm : ImmLeaf<i32, [{ return isUInt<2>(Imm); }]>;
16-
def Msk4Imm : ImmLeaf<i32, [{ return isUInt<4>(Imm); }]>;
17-
def Msk8Imm : ImmLeaf<i32, [{ return isUInt<8>(Imm); }]>;
18-
19-
def MMA : Predicate<"Subtarget->hasMMA()">;
20-
2114
class XX3Form_AT3_XABp5_P1<bits<6> opcode, bits<8> xo, dag OOL, dag IOL,
2215
string asmstr, list<dag> pattern>
2316
: I<opcode, OOL, IOL, asmstr, NoItinerary> {
@@ -132,7 +125,7 @@ class MMIRR_XX3Form_X8YP4_XAp5B6<bits<6> opcode, bits<8> xo, dag OOL, dag IOL,
132125

133126
multiclass DMR_UM_XOEO<bits<6> opcode, bits<8> xo, dag IOL, string asmbase,
134127
string asmstr> {
135-
let Predicates = [IsISAFuture] in {
128+
let Predicates = [MMA, IsISAFuture] in {
136129
def NAME :
137130
XX3Form_AT3_XAp5B6<opcode, !or(xo, 0x01), (outs dmr:$AT), IOL,
138131
!strconcat(asmbase#" ", asmstr), IIC_VecFP, []>,
@@ -147,7 +140,7 @@ multiclass DMR_UM_XOEO<bits<6> opcode, bits<8> xo, dag IOL, string asmbase,
147140
multiclass DMR_UM_M448_XOEO<bits<6> opcode, bits<8> xo, dag IOL, string asmbase,
148141
string asmstr> {
149142
defm NAME : DMR_UM_XOEO<opcode, xo, IOL, asmbase, asmstr>;
150-
let Predicates = [IsISAFuture] in {
143+
let Predicates = [MMA, PrefixInstrs, IsISAFuture] in {
151144
def PM#NAME :
152145
MMIRR_XX3Form_X8YP4_XAp5B6<
153146
opcode, !or(xo, 0x01), (outs dmr:$AT),

llvm/lib/Target/PowerPC/PPCInstrInfo.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3474,6 +3474,13 @@ class PPCAsmPseudo<string asm, dag iops>
34743474
let TSFlags{10} = MemriOp;
34753475
}
34763476

3477+
// Mask immediates for MMA instructions (2, 4 and 8 bits).
3478+
def Msk2Imm : ImmLeaf<i32, [{ return isUInt<2>(Imm); }]>;
3479+
def Msk4Imm : ImmLeaf<i32, [{ return isUInt<4>(Imm); }]>;
3480+
def Msk8Imm : ImmLeaf<i32, [{ return isUInt<8>(Imm); }]>;
3481+
3482+
def MMA : Predicate<"Subtarget->hasMMA()">;
3483+
34773484
// Prefixed instructions may require access to the above defs at a later
34783485
// time so we include this after the def.
34793486
include "PPCInstrP10.td"

0 commit comments

Comments
 (0)