@@ -8296,9 +8296,9 @@ FP_TO_INTHelper(SDValue Op, SelectionDAG &DAG, bool IsSigned, bool IsReplace) co
8296
8296
8297
8297
static SDValue LowerAVXExtend(SDValue Op, SelectionDAG &DAG,
8298
8298
const X86Subtarget *Subtarget) {
8299
- EVT VT = Op->getValueType(0);
8299
+ MVT VT = Op->getValueType(0).getSimpleVT( );
8300
8300
SDValue In = Op->getOperand(0);
8301
- EVT InVT = In.getValueType();
8301
+ MVT InVT = In.getValueType().getSimpleVT ();
8302
8302
DebugLoc dl = Op->getDebugLoc();
8303
8303
8304
8304
// Optimize vectors in AVX mode:
@@ -8327,7 +8327,7 @@ static SDValue LowerAVXExtend(SDValue Op, SelectionDAG &DAG,
8327
8327
SDValue OpLo = getUnpackl(DAG, dl, InVT, In, NeedZero ? ZeroVec : Undef);
8328
8328
SDValue OpHi = getUnpackh(DAG, dl, InVT, In, NeedZero ? ZeroVec : Undef);
8329
8329
8330
- EVT HVT = EVT ::getVectorVT(*DAG.getContext(), VT.getVectorElementType(),
8330
+ MVT HVT = MVT ::getVectorVT(VT.getVectorElementType(),
8331
8331
VT.getVectorNumElements()/2);
8332
8332
8333
8333
OpLo = DAG.getNode(ISD::BITCAST, dl, HVT, OpLo);
@@ -8349,9 +8349,9 @@ SDValue X86TargetLowering::LowerANY_EXTEND(SDValue Op,
8349
8349
SDValue X86TargetLowering::LowerZERO_EXTEND(SDValue Op,
8350
8350
SelectionDAG &DAG) const {
8351
8351
DebugLoc DL = Op.getDebugLoc();
8352
- EVT VT = Op.getValueType();
8352
+ MVT VT = Op.getValueType().getSimpleVT ();
8353
8353
SDValue In = Op.getOperand(0);
8354
- EVT SVT = In.getValueType();
8354
+ MVT SVT = In.getValueType().getSimpleVT ();
8355
8355
8356
8356
if (Subtarget->hasFp256()) {
8357
8357
SDValue Res = LowerAVXExtend(Op, DAG, Subtarget);
@@ -8381,9 +8381,9 @@ SDValue X86TargetLowering::LowerZERO_EXTEND(SDValue Op,
8381
8381
8382
8382
SDValue X86TargetLowering::LowerTRUNCATE(SDValue Op, SelectionDAG &DAG) const {
8383
8383
DebugLoc DL = Op.getDebugLoc();
8384
- EVT VT = Op.getValueType();
8384
+ MVT VT = Op.getValueType().getSimpleVT ();
8385
8385
SDValue In = Op.getOperand(0);
8386
- EVT SVT = In.getValueType();
8386
+ MVT SVT = In.getValueType().getSimpleVT ();
8387
8387
8388
8388
if ((VT == MVT::v4i32) && (SVT == MVT::v4i64)) {
8389
8389
// On AVX2, v4i64 -> v4i32 becomes VPERMD.
@@ -8498,9 +8498,10 @@ SDValue X86TargetLowering::LowerTRUNCATE(SDValue Op, SelectionDAG &DAG) const {
8498
8498
8499
8499
SDValue X86TargetLowering::LowerFP_TO_SINT(SDValue Op,
8500
8500
SelectionDAG &DAG) const {
8501
- if (Op.getValueType().isVector()) {
8502
- if (Op.getValueType() == MVT::v8i16)
8503
- return DAG.getNode(ISD::TRUNCATE, Op.getDebugLoc(), Op.getValueType(),
8501
+ MVT VT = Op.getValueType().getSimpleVT();
8502
+ if (VT.isVector()) {
8503
+ if (VT == MVT::v8i16)
8504
+ return DAG.getNode(ISD::TRUNCATE, Op.getDebugLoc(), VT,
8504
8505
DAG.getNode(ISD::FP_TO_SINT, Op.getDebugLoc(),
8505
8506
MVT::v8i32, Op.getOperand(0)));
8506
8507
return SDValue();
@@ -8542,9 +8543,9 @@ SDValue X86TargetLowering::LowerFP_TO_UINT(SDValue Op,
8542
8543
SDValue X86TargetLowering::lowerFP_EXTEND(SDValue Op,
8543
8544
SelectionDAG &DAG) const {
8544
8545
DebugLoc DL = Op.getDebugLoc();
8545
- EVT VT = Op.getValueType();
8546
+ MVT VT = Op.getValueType().getSimpleVT ();
8546
8547
SDValue In = Op.getOperand(0);
8547
- EVT SVT = In.getValueType();
8548
+ MVT SVT = In.getValueType().getSimpleVT ();
8548
8549
8549
8550
assert(SVT == MVT::v2f32 && "Only customize MVT::v2f32 type legalization!");
8550
8551
@@ -8556,8 +8557,8 @@ SDValue X86TargetLowering::lowerFP_EXTEND(SDValue Op,
8556
8557
SDValue X86TargetLowering::LowerFABS(SDValue Op, SelectionDAG &DAG) const {
8557
8558
LLVMContext *Context = DAG.getContext();
8558
8559
DebugLoc dl = Op.getDebugLoc();
8559
- EVT VT = Op.getValueType();
8560
- EVT EltVT = VT;
8560
+ MVT VT = Op.getValueType().getSimpleVT ();
8561
+ MVT EltVT = VT;
8561
8562
unsigned NumElts = VT == MVT::f64 ? 2 : 4;
8562
8563
if (VT.isVector()) {
8563
8564
EltVT = VT.getVectorElementType();
@@ -8588,8 +8589,8 @@ SDValue X86TargetLowering::LowerFABS(SDValue Op, SelectionDAG &DAG) const {
8588
8589
SDValue X86TargetLowering::LowerFNEG(SDValue Op, SelectionDAG &DAG) const {
8589
8590
LLVMContext *Context = DAG.getContext();
8590
8591
DebugLoc dl = Op.getDebugLoc();
8591
- EVT VT = Op.getValueType();
8592
- EVT EltVT = VT;
8592
+ MVT VT = Op.getValueType().getSimpleVT ();
8593
+ MVT EltVT = VT;
8593
8594
unsigned NumElts = VT == MVT::f64 ? 2 : 4;
8594
8595
if (VT.isVector()) {
8595
8596
EltVT = VT.getVectorElementType();
@@ -8623,8 +8624,8 @@ SDValue X86TargetLowering::LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG) const {
8623
8624
SDValue Op0 = Op.getOperand(0);
8624
8625
SDValue Op1 = Op.getOperand(1);
8625
8626
DebugLoc dl = Op.getDebugLoc();
8626
- EVT VT = Op.getValueType();
8627
- EVT SrcVT = Op1.getValueType();
8627
+ MVT VT = Op.getValueType().getSimpleVT ();
8628
+ MVT SrcVT = Op1.getValueType().getSimpleVT ();
8628
8629
8629
8630
// If second operand is smaller, extend it first.
8630
8631
if (SrcVT.bitsLT(VT)) {
@@ -8694,7 +8695,7 @@ SDValue X86TargetLowering::LowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG) const {
8694
8695
static SDValue LowerFGETSIGN(SDValue Op, SelectionDAG &DAG) {
8695
8696
SDValue N0 = Op.getOperand(0);
8696
8697
DebugLoc dl = Op.getDebugLoc();
8697
- EVT VT = Op.getValueType();
8698
+ MVT VT = Op.getValueType().getSimpleVT ();
8698
8699
8699
8700
// Lower ISD::FGETSIGN to (AND (X86ISD::FGETSIGNx86 ...) 1).
8700
8701
SDValue xFGETSIGN = DAG.getNode(X86ISD::FGETSIGNx86, dl, VT, N0,
@@ -9499,7 +9500,7 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
9499
9500
9500
9501
SDValue Cmp = Cond.getOperand(1);
9501
9502
unsigned Opc = Cmp.getOpcode();
9502
- EVT VT = Op.getValueType();
9503
+ MVT VT = Op.getValueType().getSimpleVT ();
9503
9504
9504
9505
bool IllegalFPCMov = false;
9505
9506
if (VT.isFloatingPoint() && !VT.isVector() &&
@@ -9610,9 +9611,9 @@ SDValue X86TargetLowering::LowerSELECT(SDValue Op, SelectionDAG &DAG) const {
9610
9611
9611
9612
SDValue X86TargetLowering::LowerSIGN_EXTEND(SDValue Op,
9612
9613
SelectionDAG &DAG) const {
9613
- EVT VT = Op->getValueType(0);
9614
+ MVT VT = Op->getValueType(0).getSimpleVT( );
9614
9615
SDValue In = Op->getOperand(0);
9615
- EVT InVT = In.getValueType();
9616
+ MVT InVT = In.getValueType().getSimpleVT ();
9616
9617
DebugLoc dl = Op->getDebugLoc();
9617
9618
9618
9619
if ((VT != MVT::v4i64 || InVT != MVT::v4i32) &&
@@ -9646,7 +9647,7 @@ SDValue X86TargetLowering::LowerSIGN_EXTEND(SDValue Op,
9646
9647
9647
9648
SDValue OpHi = DAG.getVectorShuffle(InVT, dl, In, Undef, &ShufMask2[0]);
9648
9649
9649
- EVT HalfVT = EVT ::getVectorVT(*DAG.getContext(), VT.getScalarType(),
9650
+ MVT HalfVT = MVT ::getVectorVT(VT.getScalarType(),
9650
9651
VT.getVectorNumElements()/2);
9651
9652
9652
9653
OpLo = DAG.getNode(X86ISD::VSEXT_MOVL, dl, HalfVT, OpLo);
0 commit comments