mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-06 14:57:41 +00:00
Allow CRC32 instructions to be selected when AVX is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147411 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
de9e4c728e
commit
a86bcfb565
@ -436,7 +436,7 @@ class SS428I<bits<8> o, Format F, dag outs, dag ins, string asm,
|
|||||||
// SS42FI - SSE 4.2 instructions with T8XD prefix.
|
// SS42FI - SSE 4.2 instructions with T8XD prefix.
|
||||||
class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
class SS42FI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
||||||
list<dag> pattern>
|
list<dag> pattern>
|
||||||
: I<o, F, outs, ins, asm, pattern>, T8XD, Requires<[HasSSE42]>;
|
: I<o, F, outs, ins, asm, pattern>, T8XD, Requires<[HasSSE42orAVX]>;
|
||||||
|
|
||||||
// SS42AI = SSE 4.2 instructions with TA prefix
|
// SS42AI = SSE 4.2 instructions with TA prefix
|
||||||
class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
class SS42AI<bits<8> o, Format F, dag outs, dag ins, string asm,
|
||||||
|
@ -476,6 +476,7 @@ def HasAVX2 : Predicate<"Subtarget->hasAVX2()">;
|
|||||||
def HasXMM : Predicate<"Subtarget->hasXMM()">;
|
def HasXMM : Predicate<"Subtarget->hasXMM()">;
|
||||||
def HasXMMInt : Predicate<"Subtarget->hasXMMInt()">;
|
def HasXMMInt : Predicate<"Subtarget->hasXMMInt()">;
|
||||||
def HasSSE3orAVX : Predicate<"Subtarget->hasSSE3orAVX()">;
|
def HasSSE3orAVX : Predicate<"Subtarget->hasSSE3orAVX()">;
|
||||||
|
def HasSSE42orAVX : Predicate<"Subtarget->hasSSE42orAVX()">;
|
||||||
|
|
||||||
def HasPOPCNT : Predicate<"Subtarget->hasPOPCNT()">;
|
def HasPOPCNT : Predicate<"Subtarget->hasPOPCNT()">;
|
||||||
def HasAES : Predicate<"Subtarget->hasAES()">;
|
def HasAES : Predicate<"Subtarget->hasAES()">;
|
||||||
|
@ -2530,3 +2530,24 @@ entry:
|
|||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
declare void @llvm.x86.sse2.clflush(i8*) nounwind
|
declare void @llvm.x86.sse2.clflush(i8*) nounwind
|
||||||
|
|
||||||
|
; CHECK: crc32b
|
||||||
|
define i32 @crc32_32_8(i32 %a, i8 %b) nounwind {
|
||||||
|
%tmp = call i32 @llvm.x86.sse42.crc32.32.8(i32 %a, i8 %b)
|
||||||
|
ret i32 %tmp
|
||||||
|
}
|
||||||
|
declare i32 @llvm.x86.sse42.crc32.32.8(i32, i8) nounwind
|
||||||
|
|
||||||
|
; CHECK: crc32w
|
||||||
|
define i32 @crc32_32_16(i32 %a, i16 %b) nounwind {
|
||||||
|
%tmp = call i32 @llvm.x86.sse42.crc32.32.16(i32 %a, i16 %b)
|
||||||
|
ret i32 %tmp
|
||||||
|
}
|
||||||
|
declare i32 @llvm.x86.sse42.crc32.32.16(i32, i16) nounwind
|
||||||
|
|
||||||
|
; CHECK: crc32l
|
||||||
|
define i32 @crc32_32_32(i32 %a, i32 %b) nounwind {
|
||||||
|
%tmp = call i32 @llvm.x86.sse42.crc32.32.32(i32 %a, i32 %b)
|
||||||
|
ret i32 %tmp
|
||||||
|
}
|
||||||
|
declare i32 @llvm.x86.sse42.crc32.32.32(i32, i32) nounwind
|
||||||
|
Loading…
Reference in New Issue
Block a user