mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-09 05:11:39 +00:00
Add HasPOPCNT predicate to the POPCNT instructions. Also mark POPCNT as modifying EFLAGS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141656 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b99d5b0858
commit
c48b301fb0
@ -469,6 +469,7 @@ def HasSSE4A : Predicate<"Subtarget->hasSSE4A()">;
|
||||
def HasAVX : Predicate<"Subtarget->hasAVX()">;
|
||||
def HasXMMInt : Predicate<"Subtarget->hasXMMInt()">;
|
||||
|
||||
def HasPOPCNT : Predicate<"Subtarget->hasPOPCNT()">;
|
||||
def HasAES : Predicate<"Subtarget->hasAES()">;
|
||||
def HasCLMUL : Predicate<"Subtarget->hasCLMUL()">;
|
||||
def HasFMA3 : Predicate<"Subtarget->hasFMA3()">;
|
||||
|
@ -5700,26 +5700,28 @@ defm VTESTPDY : avx_bittest<0x0F, "vtestpd", VR256, f256mem, memopv4f64, v4f64>;
|
||||
// SSE4.1 - Misc Instructions
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
def POPCNT16rr : I<0xB8, MRMSrcReg, (outs GR16:$dst), (ins GR16:$src),
|
||||
"popcnt{w}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR16:$dst, (ctpop GR16:$src))]>, OpSize, XS;
|
||||
def POPCNT16rm : I<0xB8, MRMSrcMem, (outs GR16:$dst), (ins i16mem:$src),
|
||||
"popcnt{w}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR16:$dst, (ctpop (loadi16 addr:$src)))]>, OpSize, XS;
|
||||
let Defs = [EFLAGS], Predicates = [HasPOPCNT] in {
|
||||
def POPCNT16rr : I<0xB8, MRMSrcReg, (outs GR16:$dst), (ins GR16:$src),
|
||||
"popcnt{w}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR16:$dst, (ctpop GR16:$src))]>, OpSize, XS;
|
||||
def POPCNT16rm : I<0xB8, MRMSrcMem, (outs GR16:$dst), (ins i16mem:$src),
|
||||
"popcnt{w}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR16:$dst, (ctpop (loadi16 addr:$src)))]>, OpSize, XS;
|
||||
|
||||
def POPCNT32rr : I<0xB8, MRMSrcReg, (outs GR32:$dst), (ins GR32:$src),
|
||||
"popcnt{l}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (ctpop GR32:$src))]>, XS;
|
||||
def POPCNT32rm : I<0xB8, MRMSrcMem, (outs GR32:$dst), (ins i32mem:$src),
|
||||
"popcnt{l}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (ctpop (loadi32 addr:$src)))]>, XS;
|
||||
def POPCNT32rr : I<0xB8, MRMSrcReg, (outs GR32:$dst), (ins GR32:$src),
|
||||
"popcnt{l}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (ctpop GR32:$src))]>, XS;
|
||||
def POPCNT32rm : I<0xB8, MRMSrcMem, (outs GR32:$dst), (ins i32mem:$src),
|
||||
"popcnt{l}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR32:$dst, (ctpop (loadi32 addr:$src)))]>, XS;
|
||||
|
||||
def POPCNT64rr : RI<0xB8, MRMSrcReg, (outs GR64:$dst), (ins GR64:$src),
|
||||
"popcnt{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (ctpop GR64:$src))]>, XS;
|
||||
def POPCNT64rm : RI<0xB8, MRMSrcMem, (outs GR64:$dst), (ins i64mem:$src),
|
||||
"popcnt{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (ctpop (loadi64 addr:$src)))]>, XS;
|
||||
def POPCNT64rr : RI<0xB8, MRMSrcReg, (outs GR64:$dst), (ins GR64:$src),
|
||||
"popcnt{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (ctpop GR64:$src))]>, XS;
|
||||
def POPCNT64rm : RI<0xB8, MRMSrcMem, (outs GR64:$dst), (ins i64mem:$src),
|
||||
"popcnt{q}\t{$src, $dst|$dst, $src}",
|
||||
[(set GR64:$dst, (ctpop (loadi64 addr:$src)))]>, XS;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user