Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit 45e1c75

Browse files
committed
Use MVT instead of EVT in more instruction lowering code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172933 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f9147c4 commit 45e1c75

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

lib/Target/X86/X86ISelLowering.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4390,7 +4390,7 @@ static SDValue getZeroVector(EVT VT, const X86Subtarget *Subtarget,
43904390
/// Always build ones vectors as <4 x i32> or <8 x i32>. For 256-bit types with
43914391
/// no AVX2 supprt, use two <4 x i32> inserted in a <8 x i32> appropriately.
43924392
/// Then bitcast to their original type, ensuring they get CSE'd.
4393-
static SDValue getOnesVector(EVT VT, bool HasInt256, SelectionDAG &DAG,
4393+
static SDValue getOnesVector(MVT VT, bool HasInt256, SelectionDAG &DAG,
43944394
DebugLoc dl) {
43954395
assert(VT.isVector() && "Expected a vector type");
43964396

@@ -5100,7 +5100,7 @@ X86TargetLowering::LowerVectorBroadcast(SDValue Op, SelectionDAG &DAG) const {
51005100
if (!Subtarget->hasFp256())
51015101
return SDValue();
51025102

5103-
EVT VT = Op.getValueType();
5103+
MVT VT = Op.getValueType().getSimpleVT();
51045104
DebugLoc dl = Op.getDebugLoc();
51055105

51065106
assert((VT.is128BitVector() || VT.is256BitVector()) &&
@@ -5298,8 +5298,8 @@ SDValue
52985298
X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const {
52995299
DebugLoc dl = Op.getDebugLoc();
53005300

5301-
EVT VT = Op.getValueType();
5302-
EVT ExtVT = VT.getVectorElementType();
5301+
MVT VT = Op.getValueType().getSimpleVT();
5302+
MVT ExtVT = VT.getVectorElementType();
53035303
unsigned NumElems = Op.getNumOperands();
53045304

53055305
// Vectors containing all zeros can be matched by pxor and xorps later
@@ -5630,7 +5630,7 @@ X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const {
56305630
// to create 256-bit vectors from two other 128-bit ones.
56315631
static SDValue LowerAVXCONCAT_VECTORS(SDValue Op, SelectionDAG &DAG) {
56325632
DebugLoc dl = Op.getDebugLoc();
5633-
EVT ResVT = Op.getValueType();
5633+
MVT ResVT = Op.getValueType().getSimpleVT();
56345634

56355635
assert(ResVT.is256BitVector() && "Value type must be 256-bit wide");
56365636

@@ -7038,10 +7038,10 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
70387038
SDValue
70397039
X86TargetLowering::LowerEXTRACT_VECTOR_ELT_SSE4(SDValue Op,
70407040
SelectionDAG &DAG) const {
7041-
EVT VT = Op.getValueType();
7041+
MVT VT = Op.getValueType().getSimpleVT();
70427042
DebugLoc dl = Op.getDebugLoc();
70437043

7044-
if (!Op.getOperand(0).getValueType().is128BitVector())
7044+
if (!Op.getOperand(0).getValueType().getSimpleVT().is128BitVector())
70457045
return SDValue();
70467046

70477047
if (VT.getSizeInBits() == 8) {
@@ -7106,7 +7106,7 @@ X86TargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
71067106
return SDValue();
71077107

71087108
SDValue Vec = Op.getOperand(0);
7109-
EVT VecVT = Vec.getValueType();
7109+
MVT VecVT = Vec.getValueType().getSimpleVT();
71107110

71117111
// If this is a 256-bit vector result, first extract the 128-bit vector and
71127112
// then extract the element from the 128-bit vector.
@@ -7133,7 +7133,7 @@ X86TargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
71337133
return Res;
71347134
}
71357135

7136-
EVT VT = Op.getValueType();
7136+
MVT VT = Op.getValueType().getSimpleVT();
71377137
DebugLoc dl = Op.getDebugLoc();
71387138
// TODO: handle v16i8.
71397139
if (VT.getSizeInBits() == 16) {
@@ -7146,7 +7146,7 @@ X86TargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
71467146
MVT::v4i32, Vec),
71477147
Op.getOperand(1)));
71487148
// Transform it so it match pextrw which produces a 32-bit result.
7149-
EVT EltVT = MVT::i32;
7149+
MVT EltVT = MVT::i32;
71507150
SDValue Extract = DAG.getNode(X86ISD::PEXTRW, dl, EltVT,
71517151
Op.getOperand(0), Op.getOperand(1));
71527152
SDValue Assert = DAG.getNode(ISD::AssertZext, dl, EltVT, Extract,
@@ -7161,7 +7161,7 @@ X86TargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
71617161

71627162
// SHUFPS the element to the lowest double word, then movss.
71637163
int Mask[4] = { static_cast<int>(Idx), -1, -1, -1 };
7164-
EVT VVT = Op.getOperand(0).getValueType();
7164+
MVT VVT = Op.getOperand(0).getValueType().getSimpleVT();
71657165
SDValue Vec = DAG.getVectorShuffle(VVT, dl, Op.getOperand(0),
71667166
DAG.getUNDEF(VVT), Mask);
71677167
return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, VT, Vec,
@@ -7180,7 +7180,7 @@ X86TargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
71807180
// Note if the lower 64 bits of the result of the UNPCKHPD is then stored
71817181
// to a f64mem, the whole operation is folded into a single MOVHPDmr.
71827182
int Mask[2] = { 1, -1 };
7183-
EVT VVT = Op.getOperand(0).getValueType();
7183+
MVT VVT = Op.getOperand(0).getValueType().getSimpleVT();
71847184
SDValue Vec = DAG.getVectorShuffle(VVT, dl, Op.getOperand(0),
71857185
DAG.getUNDEF(VVT), Mask);
71867186
return DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, VT, Vec,
@@ -7193,8 +7193,8 @@ X86TargetLowering::LowerEXTRACT_VECTOR_ELT(SDValue Op,
71937193
SDValue
71947194
X86TargetLowering::LowerINSERT_VECTOR_ELT_SSE4(SDValue Op,
71957195
SelectionDAG &DAG) const {
7196-
EVT VT = Op.getValueType();
7197-
EVT EltVT = VT.getVectorElementType();
7196+
MVT VT = Op.getValueType().getSimpleVT();
7197+
MVT EltVT = VT.getVectorElementType();
71987198
DebugLoc dl = Op.getDebugLoc();
71997199

72007200
SDValue N0 = Op.getOperand(0);
@@ -7247,8 +7247,8 @@ X86TargetLowering::LowerINSERT_VECTOR_ELT_SSE4(SDValue Op,
72477247

72487248
SDValue
72497249
X86TargetLowering::LowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const {
7250-
EVT VT = Op.getValueType();
7251-
EVT EltVT = VT.getVectorElementType();
7250+
MVT VT = Op.getValueType().getSimpleVT();
7251+
MVT EltVT = VT.getVectorElementType();
72527252

72537253
DebugLoc dl = Op.getDebugLoc();
72547254
SDValue N0 = Op.getOperand(0);
@@ -7296,7 +7296,7 @@ X86TargetLowering::LowerINSERT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) const {
72967296
static SDValue LowerSCALAR_TO_VECTOR(SDValue Op, SelectionDAG &DAG) {
72977297
LLVMContext *Context = DAG.getContext();
72987298
DebugLoc dl = Op.getDebugLoc();
7299-
EVT OpVT = Op.getValueType();
7299+
MVT OpVT = Op.getValueType().getSimpleVT();
73007300

73017301
// If this is a 256-bit vector result, first insert into a 128-bit
73027302
// vector and then insert into the 256-bit vector.

0 commit comments

Comments
 (0)