mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-30 15:22:41 +00:00
AVX-512: store and truncstore for i1 values
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206897 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4e2e959d6f
commit
b84cc10c3c
@ -14393,6 +14393,7 @@ const char *X86TargetLowering::getTargetNodeName(unsigned Opcode) const {
|
|||||||
case X86ISD::UNPCKH: return "X86ISD::UNPCKH";
|
case X86ISD::UNPCKH: return "X86ISD::UNPCKH";
|
||||||
case X86ISD::VBROADCAST: return "X86ISD::VBROADCAST";
|
case X86ISD::VBROADCAST: return "X86ISD::VBROADCAST";
|
||||||
case X86ISD::VBROADCASTM: return "X86ISD::VBROADCASTM";
|
case X86ISD::VBROADCASTM: return "X86ISD::VBROADCASTM";
|
||||||
|
case X86ISD::VEXTRACT: return "X86ISD::VEXTRACT";
|
||||||
case X86ISD::VPERMILP: return "X86ISD::VPERMILP";
|
case X86ISD::VPERMILP: return "X86ISD::VPERMILP";
|
||||||
case X86ISD::VPERM2X128: return "X86ISD::VPERM2X128";
|
case X86ISD::VPERM2X128: return "X86ISD::VPERM2X128";
|
||||||
case X86ISD::VPERMV: return "X86ISD::VPERMV";
|
case X86ISD::VPERMV: return "X86ISD::VPERMV";
|
||||||
|
@ -4265,3 +4265,15 @@ def : Pat<(int_x86_avx512_mask_conflict_q_512 VR512:$src2, VR512:$src1,
|
|||||||
def : Pat<(store (i1 -1), addr:$dst), (MOV8mi addr:$dst, (i8 1))>;
|
def : Pat<(store (i1 -1), addr:$dst), (MOV8mi addr:$dst, (i8 1))>;
|
||||||
def : Pat<(store (i1 1), addr:$dst), (MOV8mi addr:$dst, (i8 1))>;
|
def : Pat<(store (i1 1), addr:$dst), (MOV8mi addr:$dst, (i8 1))>;
|
||||||
def : Pat<(store (i1 0), addr:$dst), (MOV8mi addr:$dst, (i8 0))>;
|
def : Pat<(store (i1 0), addr:$dst), (MOV8mi addr:$dst, (i8 0))>;
|
||||||
|
|
||||||
|
def : Pat<(store VK1:$src, addr:$dst),
|
||||||
|
(KMOVWmk addr:$dst, (COPY_TO_REGCLASS VK1:$src, VK16))>;
|
||||||
|
|
||||||
|
def truncstorei1 : PatFrag<(ops node:$val, node:$ptr),
|
||||||
|
(truncstore node:$val, node:$ptr), [{
|
||||||
|
return cast<StoreSDNode>(N)->getMemoryVT() == MVT::i1;
|
||||||
|
}]>;
|
||||||
|
|
||||||
|
def : Pat<(truncstorei1 GR8:$src, addr:$dst),
|
||||||
|
(MOV8mr addr:$dst, GR8:$src)>;
|
||||||
|
|
||||||
|
@ -153,12 +153,31 @@ define void @test18(i8 * %addr, <8 x i64> %data) {
|
|||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
; CHECK-LABEL: store_i1
|
; CHECK-LABEL: store_i1_1
|
||||||
; CHECK: movb
|
; CHECK: movb
|
||||||
; CHECK: movb
|
; CHECK: movb
|
||||||
; CHECK: ret
|
; CHECK: ret
|
||||||
define void @store_i1() {
|
define void @store_i1_1() {
|
||||||
store i1 true, i1 addrspace(3)* undef, align 128
|
store i1 true, i1 addrspace(3)* undef, align 128
|
||||||
store i1 false, i1 addrspace(2)* undef, align 128
|
store i1 false, i1 addrspace(2)* undef, align 128
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; CHECK-LABEL: store_i1_2
|
||||||
|
; CHECK: movb
|
||||||
|
; CHECK: ret
|
||||||
|
define void @store_i1_2(i64 %a, i64 %b) {
|
||||||
|
%res = icmp eq i64 %a, %b
|
||||||
|
store i1 %res, i1 addrspace(3)* undef, align 128
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
|
||||||
|
; CHECK-LABEL: store_i1_3
|
||||||
|
; CHECK: kmovw
|
||||||
|
; CHECK: ret
|
||||||
|
define void @store_i1_3(i16 %a) {
|
||||||
|
%a_vec = bitcast i16 %a to <16 x i1>
|
||||||
|
%res = extractelement <16 x i1> %a_vec, i32 4
|
||||||
|
store i1 %res, i1 addrspace(3)* undef, align 128
|
||||||
|
ret void
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user