[llvm] [X86] Support APX promoted RAO-INT and MOVBE instructions (PR #77431)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 18:32:15 PST 2024
================
@@ -25,21 +25,30 @@ def X86rao_xor : SDNode<"X86ISD::AXOR", SDTRAOBinaryArith,
def X86rao_and : SDNode<"X86ISD::AAND", SDTRAOBinaryArith,
[SDNPHasChain, SDNPMayStore, SDNPMemOperand]>;
-multiclass RAOINT_BASE<string OpcodeStr> {
+multiclass RAOINT_BASE<string OpcodeStr, string Suffix = ""> {
let Predicates = [HasRAOINT] in
- def 32mr : I<0xfc, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src),
- !strconcat("a", OpcodeStr, "{l}\t{$src, $dst|$dst, $src}"),
- [(!cast<SDNode>("X86rao_" # OpcodeStr) addr:$dst, GR32:$src)]>,
- Sched<[WriteALURMW]>;
+ def 32mr#Suffix : I<0xfc, MRMDestMem, (outs), (ins i32mem:$dst, GR32:$src),
+ !strconcat("a", OpcodeStr, "{l}\t{$src, $dst|$dst, $src}"),
+ [(!cast<SDNode>("X86rao_" # OpcodeStr) addr:$dst, GR32:$src)]>,
+ Sched<[WriteALURMW]>;
let Predicates = [HasRAOINT, In64BitMode] in
- def 64mr : I<0xfc, MRMDestMem, (outs), (ins i64mem:$dst, GR64:$src),
- !strconcat("a", OpcodeStr, "{q}\t{$src, $dst|$dst, $src}"),
- [(!cast<SDNode>("X86rao_" # OpcodeStr) addr:$dst, GR64:$src)]>,
- Sched<[WriteALURMW]>, REX_W;
+ def 64mr#Suffix : I<0xfc, MRMDestMem, (outs), (ins i64mem:$dst, GR64:$src),
+ !strconcat("a", OpcodeStr, "{q}\t{$src, $dst|$dst, $src}"),
+ [(!cast<SDNode>("X86rao_" # OpcodeStr) addr:$dst, GR64:$src)]>,
+ Sched<[WriteALURMW]>, REX_W;
----------------
KanRobert wrote:
src -> src1
{$src, $dst|$dst, $src} -> binop_args
https://github.com/llvm/llvm-project/pull/77431
More information about the llvm-commits
mailing list