Skip to content

Commit b26c0ed

Browse files
committed
[X86][NFC] Remove class BinOpRM_ImplicitUse b/c it's used once only
1 parent 5fa46da commit b26c0ed

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

llvm/lib/Target/X86/X86InstrArithmetic.td

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,6 @@ class BinOpRM<bits<8> opcode, string mnemonic, X86TypeInfo typeinfo,
121121
mnemonic, "{$src2, $src1|$src1, $src2}", pattern>,
122122
Sched<[sched.Folded, sched.ReadAfterFold]>;
123123

124-
// BinOpRM_ImplicitUse - Binary instructions with inputs "reg, [mem]".
125-
// There is an implicit register read at the end of the operand sequence.
126-
class BinOpRM_ImplicitUse<bits<8> opcode, string mnemonic, X86TypeInfo typeinfo,
127-
dag outlist, X86FoldableSchedWrite sched, list<dag> pattern>
128-
: ITy<opcode, MRMSrcMem, typeinfo, outlist,
129-
(ins typeinfo.RegClass:$src1, typeinfo.MemOperand:$src2),
130-
mnemonic, "{$src2, $src1|$src1, $src2}", pattern>,
131-
Sched<[sched.Folded, sched.ReadAfterFold,
132-
// base, scale, index, offset, segment.
133-
ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault,
134-
// implicit register read.
135-
sched.ReadAfterFold]>;
136-
137124
// BinOpRM_F - Binary instructions with inputs "reg, [mem]", where the pattern
138125
// has just a EFLAGS as a result.
139126
class BinOpRM_F<bits<8> opcode, string mnemonic, X86TypeInfo typeinfo,
@@ -154,11 +141,16 @@ class BinOpRM_RF<bits<8> opcode, string mnemonic, X86TypeInfo typeinfo,
154141
// has both a regclass and EFLAGS as a result, and has EFLAGS as input.
155142
class BinOpRM_RFF<bits<8> opcode, string mnemonic, X86TypeInfo typeinfo,
156143
SDNode opnode>
157-
: BinOpRM_ImplicitUse<opcode, mnemonic, typeinfo,
158-
(outs typeinfo.RegClass:$dst), WriteADC,
159-
[(set typeinfo.RegClass:$dst, EFLAGS,
160-
(opnode typeinfo.RegClass:$src1,
161-
(typeinfo.LoadNode addr:$src2), EFLAGS))]>;
144+
: BinOpRM<opcode, mnemonic, typeinfo, (outs typeinfo.RegClass:$dst), WriteADC,
145+
[(set typeinfo.RegClass:$dst, EFLAGS,
146+
(opnode typeinfo.RegClass:$src1, (typeinfo.LoadNode addr:$src2),
147+
EFLAGS))]> {
148+
let SchedRW = [WriteADC.Folded, WriteADC.ReadAfterFold,
149+
// base, scale, index, offset, segment.
150+
ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault,
151+
// implicit register read.
152+
WriteADC.ReadAfterFold];
153+
}
162154

163155
// BinOpRI - Binary instructions with inputs "reg, imm".
164156
class BinOpRI<bits<8> opcode, string mnemonic, X86TypeInfo typeinfo,

0 commit comments

Comments
 (0)