mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
AVX-512: MUL operation lowering for v8i64
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
348da8d6b5
commit
0cfca3d7ac
@ -12402,8 +12402,8 @@ static SDValue LowerMUL(SDValue Op, const X86Subtarget *Subtarget,
|
||||
return DAG.getVectorShuffle(VT, dl, Evens, Odds, ShufMask);
|
||||
}
|
||||
|
||||
assert((VT == MVT::v2i64 || VT == MVT::v4i64) &&
|
||||
"Only know how to lower V2I64/V4I64 multiply");
|
||||
assert((VT == MVT::v2i64 || VT == MVT::v4i64 || VT == MVT::v8i64) &&
|
||||
"Only know how to lower V2I64/V4I64/V8I64 multiply");
|
||||
|
||||
// Ahi = psrlqi(a, 32);
|
||||
// Bhi = psrlqi(b, 32);
|
||||
@ -12422,7 +12422,8 @@ static SDValue LowerMUL(SDValue Op, const X86Subtarget *Subtarget,
|
||||
SDValue Bhi = DAG.getNode(X86ISD::VSRLI, dl, VT, B, ShAmt);
|
||||
|
||||
// Bit cast to 32-bit vectors for MULUDQ
|
||||
EVT MulVT = (VT == MVT::v2i64) ? MVT::v4i32 : MVT::v8i32;
|
||||
EVT MulVT = (VT == MVT::v2i64) ? MVT::v4i32 :
|
||||
(VT == MVT::v4i64) ? MVT::v8i32 : MVT::v16i32;
|
||||
A = DAG.getNode(ISD::BITCAST, dl, MulVT, A);
|
||||
B = DAG.getNode(ISD::BITCAST, dl, MulVT, B);
|
||||
Ahi = DAG.getNode(ISD::BITCAST, dl, MulVT, Ahi);
|
||||
|
@ -74,6 +74,15 @@ entry:
|
||||
ret <16 x float> %sub.i
|
||||
}
|
||||
|
||||
; CHECK-LABEL: imulq512
|
||||
; CHECK: vpmuludq
|
||||
; CHECK: vpmuludq
|
||||
; CHECK: ret
|
||||
define <8 x i64> @imulq512(<8 x i64> %y, <8 x i64> %x) {
|
||||
%z = mul <8 x i64>%x, %y
|
||||
ret <8 x i64>%z
|
||||
}
|
||||
|
||||
; CHECK-LABEL: mulpd512
|
||||
; CHECK: vmulpd
|
||||
; CHECK: ret
|
||||
@ -259,4 +268,4 @@ entry:
|
||||
%c = shufflevector <8 x i64> %b, <8 x i64> undef, <8 x i32> zeroinitializer
|
||||
%d = and <8 x i64> %p1, %c
|
||||
ret <8 x i64>%d
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user