@@ -25,30 +25,26 @@ def X86rao_xor : SDNode<"X86ISD::AXOR", SDTRAOBinaryArith,
25
25
def X86rao_and : SDNode<"X86ISD::AAND", SDTRAOBinaryArith,
26
26
[SDNPHasChain, SDNPMayStore, SDNPMemOperand]>;
27
27
28
- multiclass RAOINT_BASE<string m, string suffix = ""> {
29
- let Predicates = [HasRAOINT] in
30
- def 32mr#suffix : I<0xfc, MRMDestMem, (outs), (ins i32mem:$src1, GR32:$src2),
31
- !strconcat("a", m, "{l}\t", binop_args),
32
- [(!cast<SDNode>("X86rao_" # m) addr:$src1, GR32:$src2)]>,
33
- NoCD8, Sched<[WriteALURMW]>;
28
+ multiclass RaoInt<string m, string suffix = ""> {
29
+ let SchedRW = [WriteALURMW, ReadDefault, ReadDefault, ReadDefault, ReadDefault, ReadDefault] in {
30
+ def 32mr#suffix : BinOpMR<0xfc, "a"#m, binop_args, Xi32, (outs),
31
+ [(!cast<SDNode>("X86rao_" # m) addr:$src1, GR32:$src2)]>;
34
32
35
- let Predicates = [HasRAOINT, In64BitMode] in
36
- def 64mr#suffix : I<0xfc, MRMDestMem, (outs), (ins i64mem:$src1, GR64:$src2),
37
- !strconcat("a", m, "{q}\t", binop_args),
38
- [(!cast<SDNode>("X86rao_" # m) addr:$src1, GR64:$src2)]>,
39
- NoCD8, Sched<[WriteALURMW]>, REX_W;
33
+ def 64mr#suffix : BinOpMR<0xfc, "a"#m, binop_args, Xi64, (outs),
34
+ [(!cast<SDNode>("X86rao_" # m) addr:$src1, GR64:$src2)]>, REX_W;
35
+ }
40
36
}
41
37
42
38
let Predicates = [HasRAOINT, NoEGPR] in {
43
- defm AADD : RAOINT_BASE <"add">, T8;
44
- defm AAND : RAOINT_BASE <"and">, T8, PD;
45
- defm AOR : RAOINT_BASE <"or" >, T8, XD;
46
- defm AXOR : RAOINT_BASE <"xor">, T8, XS;
39
+ defm AADD : RaoInt <"add">, T8;
40
+ defm AAND : RaoInt <"and">, T8, PD;
41
+ defm AOR : RaoInt <"or" >, T8, XD;
42
+ defm AXOR : RaoInt <"xor">, T8, XS;
47
43
}
48
44
49
45
let Predicates = [HasRAOINT, HasEGPR, In64BitMode] in {
50
- defm AADD : RAOINT_BASE <"add", "_EVEX">, EVEX, T_MAP4;
51
- defm AAND : RAOINT_BASE <"and", "_EVEX">, EVEX, T_MAP4, PD;
52
- defm AOR : RAOINT_BASE <"or", "_EVEX">, EVEX, T_MAP4, XD;
53
- defm AXOR : RAOINT_BASE <"xor", "_EVEX">, EVEX, T_MAP4, XS;
46
+ defm AADD : RaoInt <"add", "_EVEX">, EVEX, T_MAP4;
47
+ defm AAND : RaoInt <"and", "_EVEX">, EVEX, T_MAP4, PD;
48
+ defm AOR : RaoInt <"or", "_EVEX">, EVEX, T_MAP4, XD;
49
+ defm AXOR : RaoInt <"xor", "_EVEX">, EVEX, T_MAP4, XS;
54
50
}
0 commit comments