mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
Remove AVX2 specific X86ISD node types for PUNPCKH/L and instead just reuse the 128-bit versions and let the vector type distinguish.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145125 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a42633273
commit
f475a55bd4
@ -2851,10 +2851,6 @@ static bool isTargetShuffle(unsigned Opcode) {
|
||||
case X86ISD::PUNPCKLBW:
|
||||
case X86ISD::PUNPCKLDQ:
|
||||
case X86ISD::PUNPCKLQDQ:
|
||||
case X86ISD::VPUNPCKLWDY:
|
||||
case X86ISD::VPUNPCKLBWY:
|
||||
case X86ISD::VPUNPCKLDQY:
|
||||
case X86ISD::VPUNPCKLQDQY:
|
||||
case X86ISD::UNPCKHPS:
|
||||
case X86ISD::UNPCKHPD:
|
||||
case X86ISD::VUNPCKHPSY:
|
||||
@ -2863,10 +2859,6 @@ static bool isTargetShuffle(unsigned Opcode) {
|
||||
case X86ISD::PUNPCKHBW:
|
||||
case X86ISD::PUNPCKHDQ:
|
||||
case X86ISD::PUNPCKHQDQ:
|
||||
case X86ISD::VPUNPCKHWDY:
|
||||
case X86ISD::VPUNPCKHBWY:
|
||||
case X86ISD::VPUNPCKHDQY:
|
||||
case X86ISD::VPUNPCKHQDQY:
|
||||
case X86ISD::VPERMILPS:
|
||||
case X86ISD::VPERMILPSY:
|
||||
case X86ISD::VPERMILPD:
|
||||
@ -2940,10 +2932,6 @@ static SDValue getTargetShuffleNode(unsigned Opc, DebugLoc dl, EVT VT,
|
||||
case X86ISD::PUNPCKLBW:
|
||||
case X86ISD::PUNPCKLDQ:
|
||||
case X86ISD::PUNPCKLQDQ:
|
||||
case X86ISD::VPUNPCKLWDY:
|
||||
case X86ISD::VPUNPCKLBWY:
|
||||
case X86ISD::VPUNPCKLDQY:
|
||||
case X86ISD::VPUNPCKLQDQY:
|
||||
case X86ISD::UNPCKHPS:
|
||||
case X86ISD::UNPCKHPD:
|
||||
case X86ISD::VUNPCKHPSY:
|
||||
@ -2952,10 +2940,6 @@ static SDValue getTargetShuffleNode(unsigned Opc, DebugLoc dl, EVT VT,
|
||||
case X86ISD::PUNPCKHBW:
|
||||
case X86ISD::PUNPCKHDQ:
|
||||
case X86ISD::PUNPCKHQDQ:
|
||||
case X86ISD::VPUNPCKHWDY:
|
||||
case X86ISD::VPUNPCKHBWY:
|
||||
case X86ISD::VPUNPCKHDQY:
|
||||
case X86ISD::VPUNPCKHQDQY:
|
||||
return DAG.getNode(Opc, dl, VT, V1, V2);
|
||||
}
|
||||
return SDValue();
|
||||
@ -4663,10 +4647,6 @@ static SDValue getShuffleScalarElt(SDNode *N, int Index, SelectionDAG &DAG,
|
||||
case X86ISD::PUNPCKHWD:
|
||||
case X86ISD::PUNPCKHDQ:
|
||||
case X86ISD::PUNPCKHQDQ:
|
||||
case X86ISD::VPUNPCKHBWY:
|
||||
case X86ISD::VPUNPCKHWDY:
|
||||
case X86ISD::VPUNPCKHDQY:
|
||||
case X86ISD::VPUNPCKHQDQY:
|
||||
DecodePUNPCKHMask(NumElems, ShuffleMask);
|
||||
break;
|
||||
case X86ISD::UNPCKHPS:
|
||||
@ -4679,10 +4659,6 @@ static SDValue getShuffleScalarElt(SDNode *N, int Index, SelectionDAG &DAG,
|
||||
case X86ISD::PUNPCKLWD:
|
||||
case X86ISD::PUNPCKLDQ:
|
||||
case X86ISD::PUNPCKLQDQ:
|
||||
case X86ISD::VPUNPCKLBWY:
|
||||
case X86ISD::VPUNPCKLWDY:
|
||||
case X86ISD::VPUNPCKLDQY:
|
||||
case X86ISD::VPUNPCKLQDQY:
|
||||
DecodePUNPCKLMask(VT, ShuffleMask);
|
||||
break;
|
||||
case X86ISD::UNPCKLPS:
|
||||
@ -6609,17 +6585,17 @@ static inline unsigned getUNPCKLOpcode(EVT VT, bool HasAVX2) {
|
||||
case MVT::v4f32: return X86ISD::UNPCKLPS;
|
||||
case MVT::v2f64: return X86ISD::UNPCKLPD;
|
||||
case MVT::v8i32:
|
||||
if (HasAVX2) return X86ISD::VPUNPCKLDQY;
|
||||
if (HasAVX2) return X86ISD::PUNPCKLDQ;
|
||||
// else use fp unit for int unpack.
|
||||
case MVT::v8f32: return X86ISD::VUNPCKLPSY;
|
||||
case MVT::v4i64:
|
||||
if (HasAVX2) return X86ISD::VPUNPCKLQDQY;
|
||||
if (HasAVX2) return X86ISD::PUNPCKLQDQ;
|
||||
// else use fp unit for int unpack.
|
||||
case MVT::v4f64: return X86ISD::VUNPCKLPDY;
|
||||
case MVT::v32i8:
|
||||
case MVT::v16i8: return X86ISD::PUNPCKLBW;
|
||||
case MVT::v16i16:
|
||||
case MVT::v8i16: return X86ISD::PUNPCKLWD;
|
||||
case MVT::v16i16: return X86ISD::VPUNPCKLWDY;
|
||||
case MVT::v32i8: return X86ISD::VPUNPCKLBWY;
|
||||
default:
|
||||
llvm_unreachable("Unknown type for unpckl");
|
||||
}
|
||||
@ -6633,17 +6609,17 @@ static inline unsigned getUNPCKHOpcode(EVT VT, bool HasAVX2) {
|
||||
case MVT::v4f32: return X86ISD::UNPCKHPS;
|
||||
case MVT::v2f64: return X86ISD::UNPCKHPD;
|
||||
case MVT::v8i32:
|
||||
if (HasAVX2) return X86ISD::VPUNPCKHDQY;
|
||||
if (HasAVX2) return X86ISD::PUNPCKHDQ;
|
||||
// else use fp unit for int unpack.
|
||||
case MVT::v8f32: return X86ISD::VUNPCKHPSY;
|
||||
case MVT::v4i64:
|
||||
if (HasAVX2) return X86ISD::VPUNPCKHQDQY;
|
||||
if (HasAVX2) return X86ISD::PUNPCKHQDQ;
|
||||
// else use fp unit for int unpack.
|
||||
case MVT::v4f64: return X86ISD::VUNPCKHPDY;
|
||||
case MVT::v32i8:
|
||||
case MVT::v16i8: return X86ISD::PUNPCKHBW;
|
||||
case MVT::v16i16:
|
||||
case MVT::v8i16: return X86ISD::PUNPCKHWD;
|
||||
case MVT::v16i16: return X86ISD::VPUNPCKHWDY;
|
||||
case MVT::v32i8: return X86ISD::VPUNPCKHBWY;
|
||||
default:
|
||||
llvm_unreachable("Unknown type for unpckh");
|
||||
}
|
||||
@ -11312,18 +11288,10 @@ const char *X86TargetLowering::getTargetNodeName(unsigned Opcode) const {
|
||||
case X86ISD::PUNPCKLWD: return "X86ISD::PUNPCKLWD";
|
||||
case X86ISD::PUNPCKLDQ: return "X86ISD::PUNPCKLDQ";
|
||||
case X86ISD::PUNPCKLQDQ: return "X86ISD::PUNPCKLQDQ";
|
||||
case X86ISD::VPUNPCKLBWY: return "X86ISD::VPUNPCKLBWY";
|
||||
case X86ISD::VPUNPCKLWDY: return "X86ISD::VPUNPCKLWDY";
|
||||
case X86ISD::VPUNPCKLDQY: return "X86ISD::VPUNPCKLDQY";
|
||||
case X86ISD::VPUNPCKLQDQY: return "X86ISD::VPUNPCKLQDQY";
|
||||
case X86ISD::PUNPCKHBW: return "X86ISD::PUNPCKHBW";
|
||||
case X86ISD::PUNPCKHWD: return "X86ISD::PUNPCKHWD";
|
||||
case X86ISD::PUNPCKHDQ: return "X86ISD::PUNPCKHDQ";
|
||||
case X86ISD::PUNPCKHQDQ: return "X86ISD::PUNPCKHQDQ";
|
||||
case X86ISD::VPUNPCKHBWY: return "X86ISD::VPUNPCKHBWY";
|
||||
case X86ISD::VPUNPCKHWDY: return "X86ISD::VPUNPCKHWDY";
|
||||
case X86ISD::VPUNPCKHDQY: return "X86ISD::VPUNPCKHDQY";
|
||||
case X86ISD::VPUNPCKHQDQY: return "X86ISD::VPUNPCKHQDQY";
|
||||
case X86ISD::VBROADCAST: return "X86ISD::VBROADCAST";
|
||||
case X86ISD::VPERMILPS: return "X86ISD::VPERMILPS";
|
||||
case X86ISD::VPERMILPSY: return "X86ISD::VPERMILPSY";
|
||||
@ -14907,10 +14875,6 @@ SDValue X86TargetLowering::PerformDAGCombine(SDNode *N,
|
||||
case X86ISD::PUNPCKHWD:
|
||||
case X86ISD::PUNPCKHDQ:
|
||||
case X86ISD::PUNPCKHQDQ:
|
||||
case X86ISD::VPUNPCKHBWY:
|
||||
case X86ISD::VPUNPCKHWDY:
|
||||
case X86ISD::VPUNPCKHDQY:
|
||||
case X86ISD::VPUNPCKHQDQY:
|
||||
case X86ISD::UNPCKHPS:
|
||||
case X86ISD::UNPCKHPD:
|
||||
case X86ISD::VUNPCKHPSY:
|
||||
@ -14919,10 +14883,6 @@ SDValue X86TargetLowering::PerformDAGCombine(SDNode *N,
|
||||
case X86ISD::PUNPCKLWD:
|
||||
case X86ISD::PUNPCKLDQ:
|
||||
case X86ISD::PUNPCKLQDQ:
|
||||
case X86ISD::VPUNPCKLBWY:
|
||||
case X86ISD::VPUNPCKLWDY:
|
||||
case X86ISD::VPUNPCKLDQY:
|
||||
case X86ISD::VPUNPCKLQDQY:
|
||||
case X86ISD::UNPCKLPS:
|
||||
case X86ISD::UNPCKLPD:
|
||||
case X86ISD::VUNPCKLPSY:
|
||||
|
@ -285,18 +285,10 @@ namespace llvm {
|
||||
PUNPCKLWD,
|
||||
PUNPCKLDQ,
|
||||
PUNPCKLQDQ,
|
||||
VPUNPCKLBWY,
|
||||
VPUNPCKLWDY,
|
||||
VPUNPCKLDQY,
|
||||
VPUNPCKLQDQY,
|
||||
PUNPCKHBW,
|
||||
PUNPCKHWD,
|
||||
PUNPCKHDQ,
|
||||
PUNPCKHQDQ,
|
||||
VPUNPCKHBWY,
|
||||
VPUNPCKHWDY,
|
||||
VPUNPCKHDQY,
|
||||
VPUNPCKHQDQY,
|
||||
VPERMILPS,
|
||||
VPERMILPSY,
|
||||
VPERMILPD,
|
||||
|
@ -144,19 +144,11 @@ def X86Punpcklbw : SDNode<"X86ISD::PUNPCKLBW", SDTShuff2Op>;
|
||||
def X86Punpcklwd : SDNode<"X86ISD::PUNPCKLWD", SDTShuff2Op>;
|
||||
def X86Punpckldq : SDNode<"X86ISD::PUNPCKLDQ", SDTShuff2Op>;
|
||||
def X86Punpcklqdq : SDNode<"X86ISD::PUNPCKLQDQ", SDTShuff2Op>;
|
||||
def X86Punpcklbwy : SDNode<"X86ISD::VPUNPCKLBWY", SDTShuff2Op>;
|
||||
def X86Punpcklwdy : SDNode<"X86ISD::VPUNPCKLWDY", SDTShuff2Op>;
|
||||
def X86Punpckldqy : SDNode<"X86ISD::VPUNPCKLDQY", SDTShuff2Op>;
|
||||
def X86Punpcklqdqy : SDNode<"X86ISD::VPUNPCKLQDQY", SDTShuff2Op>;
|
||||
|
||||
def X86Punpckhbw : SDNode<"X86ISD::PUNPCKHBW", SDTShuff2Op>;
|
||||
def X86Punpckhwd : SDNode<"X86ISD::PUNPCKHWD", SDTShuff2Op>;
|
||||
def X86Punpckhdq : SDNode<"X86ISD::PUNPCKHDQ", SDTShuff2Op>;
|
||||
def X86Punpckhqdq : SDNode<"X86ISD::PUNPCKHQDQ", SDTShuff2Op>;
|
||||
def X86Punpckhbwy : SDNode<"X86ISD::VPUNPCKHBWY", SDTShuff2Op>;
|
||||
def X86Punpckhwdy : SDNode<"X86ISD::VPUNPCKHWDY", SDTShuff2Op>;
|
||||
def X86Punpckhdqy : SDNode<"X86ISD::VPUNPCKHDQY", SDTShuff2Op>;
|
||||
def X86Punpckhqdqy : SDNode<"X86ISD::VPUNPCKHQDQY", SDTShuff2Op>;
|
||||
|
||||
def X86VPermilps : SDNode<"X86ISD::VPERMILPS", SDTShuff2OpI>;
|
||||
def X86VPermilpsy : SDNode<"X86ISD::VPERMILPSY", SDTShuff2OpI>;
|
||||
|
@ -4218,35 +4218,43 @@ let Predicates = [HasAVX] in {
|
||||
}
|
||||
|
||||
let Predicates = [HasAVX2] in {
|
||||
defm VPUNPCKLBW : sse2_unpack_y<0x60, "vpunpcklbw", v32i8, X86Punpcklbwy,
|
||||
defm VPUNPCKLBW : sse2_unpack_y<0x60, "vpunpcklbw", v32i8, X86Punpcklbw,
|
||||
bc_v32i8>, VEX_4V;
|
||||
defm VPUNPCKLWD : sse2_unpack_y<0x61, "vpunpcklwd", v16i16, X86Punpcklwdy,
|
||||
defm VPUNPCKLWD : sse2_unpack_y<0x61, "vpunpcklwd", v16i16, X86Punpcklwd,
|
||||
bc_v16i16>, VEX_4V;
|
||||
defm VPUNPCKLDQ : sse2_unpack_y<0x62, "vpunpckldq", v8i32, X86Punpckldqy,
|
||||
defm VPUNPCKLDQ : sse2_unpack_y<0x62, "vpunpckldq", v8i32, X86Punpckldq,
|
||||
bc_v8i32>, VEX_4V;
|
||||
defm VPUNPCKLQDQ : sse2_unpack_y<0x6C, "vpunpcklqdq", v4i64, X86Punpcklqdqy,
|
||||
defm VPUNPCKLQDQ : sse2_unpack_y<0x6C, "vpunpcklqdq", v4i64, X86Punpcklqdq,
|
||||
bc_v4i64>, VEX_4V;
|
||||
|
||||
defm VPUNPCKHBW : sse2_unpack_y<0x68, "vpunpckhbw", v32i8, X86Punpckhbwy,
|
||||
defm VPUNPCKHBW : sse2_unpack_y<0x68, "vpunpckhbw", v32i8, X86Punpckhbw,
|
||||
bc_v32i8>, VEX_4V;
|
||||
defm VPUNPCKHWD : sse2_unpack_y<0x69, "vpunpckhwd", v16i16, X86Punpckhwdy,
|
||||
defm VPUNPCKHWD : sse2_unpack_y<0x69, "vpunpckhwd", v16i16, X86Punpckhwd,
|
||||
bc_v16i16>, VEX_4V;
|
||||
defm VPUNPCKHDQ : sse2_unpack_y<0x6A, "vpunpckhdq", v8i32, X86Punpckhdqy,
|
||||
defm VPUNPCKHDQ : sse2_unpack_y<0x6A, "vpunpckhdq", v8i32, X86Punpckhdq,
|
||||
bc_v8i32>, VEX_4V;
|
||||
defm VPUNPCKHQDQ : sse2_unpack_y<0x6D, "vpunpckhqdq", v4i64, X86Punpckhqdqy,
|
||||
defm VPUNPCKHQDQ : sse2_unpack_y<0x6D, "vpunpckhqdq", v4i64, X86Punpckhqdq,
|
||||
bc_v4i64>, VEX_4V;
|
||||
}
|
||||
|
||||
let Constraints = "$src1 = $dst" in {
|
||||
defm PUNPCKLBW : sse2_unpack<0x60, "punpcklbw", v16i8, X86Punpcklbw, bc_v16i8>;
|
||||
defm PUNPCKLWD : sse2_unpack<0x61, "punpcklwd", v8i16, X86Punpcklwd, bc_v8i16>;
|
||||
defm PUNPCKLDQ : sse2_unpack<0x62, "punpckldq", v4i32, X86Punpckldq, bc_v4i32>;
|
||||
defm PUNPCKLQDQ : sse2_unpack<0x6C, "punpcklqdq", v2i64, X86Punpcklqdq, bc_v2i64>;
|
||||
defm PUNPCKLBW : sse2_unpack<0x60, "punpcklbw", v16i8, X86Punpcklbw,
|
||||
bc_v16i8>;
|
||||
defm PUNPCKLWD : sse2_unpack<0x61, "punpcklwd", v8i16, X86Punpcklwd,
|
||||
bc_v8i16>;
|
||||
defm PUNPCKLDQ : sse2_unpack<0x62, "punpckldq", v4i32, X86Punpckldq,
|
||||
bc_v4i32>;
|
||||
defm PUNPCKLQDQ : sse2_unpack<0x6C, "punpcklqdq", v2i64, X86Punpcklqdq,
|
||||
bc_v2i64>;
|
||||
|
||||
defm PUNPCKHBW : sse2_unpack<0x68, "punpckhbw", v16i8, X86Punpckhbw, bc_v16i8>;
|
||||
defm PUNPCKHWD : sse2_unpack<0x69, "punpckhwd", v8i16, X86Punpckhwd, bc_v8i16>;
|
||||
defm PUNPCKHDQ : sse2_unpack<0x6A, "punpckhdq", v4i32, X86Punpckhdq, bc_v4i32>;
|
||||
defm PUNPCKHQDQ : sse2_unpack<0x6D, "punpckhqdq", v2i64, X86Punpckhqdq, bc_v2i64>;
|
||||
defm PUNPCKHBW : sse2_unpack<0x68, "punpckhbw", v16i8, X86Punpckhbw,
|
||||
bc_v16i8>;
|
||||
defm PUNPCKHWD : sse2_unpack<0x69, "punpckhwd", v8i16, X86Punpckhwd,
|
||||
bc_v8i16>;
|
||||
defm PUNPCKHDQ : sse2_unpack<0x6A, "punpckhdq", v4i32, X86Punpckhdq,
|
||||
bc_v4i32>;
|
||||
defm PUNPCKHQDQ : sse2_unpack<0x6D, "punpckhqdq", v2i64, X86Punpckhqdq,
|
||||
bc_v2i64>;
|
||||
}
|
||||
} // ExeDomain = SSEPackedInt
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user