mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
AVX-512: Fixed a bug in compress and expand intrinsics.
By Igor Breger (igor.breger@intel.com) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238724 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5f3a6430d6
commit
9f63519857
@ -15670,11 +15670,12 @@ static SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SDValue Addr = Op.getOperand(2);
|
||||
SDValue Chain = Op.getOperand(0);
|
||||
|
||||
EVT VT = DataToCompress.getValueType();
|
||||
if (isAllOnes(Mask)) // return just a store
|
||||
return DAG.getStore(Chain, dl, DataToCompress, Addr,
|
||||
MachinePointerInfo(), false, false, 0);
|
||||
MachinePointerInfo(), false, false,
|
||||
VT.getScalarSizeInBits()/8);
|
||||
|
||||
EVT VT = DataToCompress.getValueType();
|
||||
EVT MaskVT = EVT::getVectorVT(*DAG.getContext(), MVT::i1,
|
||||
VT.getVectorNumElements());
|
||||
EVT BitcastVT = EVT::getVectorVT(*DAG.getContext(), MVT::i1,
|
||||
@ -15686,7 +15687,8 @@ static SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SDValue Compressed = DAG.getNode(IntrData->Opc0, dl, VT, VMask,
|
||||
DataToCompress, DAG.getUNDEF(VT));
|
||||
return DAG.getStore(Chain, dl, Compressed, Addr,
|
||||
MachinePointerInfo(), false, false, 0);
|
||||
MachinePointerInfo(), false, false,
|
||||
VT.getScalarSizeInBits()/8);
|
||||
}
|
||||
case EXPAND_FROM_MEM: {
|
||||
SDLoc dl(Op);
|
||||
@ -15698,7 +15700,7 @@ static SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, const X86Subtarget *Subtarget,
|
||||
|
||||
if (isAllOnes(Mask)) // return just a load
|
||||
return DAG.getLoad(VT, dl, Chain, Addr, MachinePointerInfo(), false, false,
|
||||
false, 0);
|
||||
false, VT.getScalarSizeInBits()/8);
|
||||
EVT MaskVT = EVT::getVectorVT(*DAG.getContext(), MVT::i1,
|
||||
VT.getVectorNumElements());
|
||||
EVT BitcastVT = EVT::getVectorVT(*DAG.getContext(), MVT::i1,
|
||||
@ -15708,7 +15710,8 @@ static SDValue LowerINTRINSIC_W_CHAIN(SDValue Op, const X86Subtarget *Subtarget,
|
||||
DAG.getIntPtrConstant(0, dl));
|
||||
|
||||
SDValue DataToExpand = DAG.getLoad(VT, dl, Chain, Addr, MachinePointerInfo(),
|
||||
false, false, false, 0);
|
||||
false, false, false,
|
||||
VT.getScalarSizeInBits()/8);
|
||||
|
||||
SDValue Results[] = {
|
||||
DAG.getNode(IntrData->Opc0, dl, VT, VMask, DataToExpand, PathThru),
|
||||
|
@ -668,7 +668,7 @@ declare <4 x float> @llvm.x86.avx512.mask.compress.ps.128(<4 x float> %data, <4
|
||||
|
||||
; CHECK-LABEL: compr7
|
||||
; CHECK-NOT: vcompress
|
||||
; CHECK: vmovapd
|
||||
; CHECK: vmovupd
|
||||
define void @compr7(i8* %addr, <8 x double> %data) {
|
||||
call void @llvm.x86.avx512.mask.compress.store.pd.512(i8* %addr, <8 x double> %data, i8 -1)
|
||||
ret void
|
||||
@ -757,7 +757,7 @@ declare <4 x float> @llvm.x86.avx512.mask.expand.ps.128(<4 x float> %data, <4 x
|
||||
|
||||
; CHECK-LABEL: expand7
|
||||
; CHECK-NOT: vexpand
|
||||
; CHECK: vmovapd
|
||||
; CHECK: vmovupd
|
||||
define <8 x double> @expand7(i8* %addr, <8 x double> %data) {
|
||||
%res = call <8 x double> @llvm.x86.avx512.mask.expand.load.pd.512(i8* %addr, <8 x double> %data, i8 -1)
|
||||
ret <8 x double> %res
|
||||
|
Loading…
Reference in New Issue
Block a user