Skip to content

Commit 5a56d2a

Browse files
committed
[LegalizeTypes] Remove unnecessary conversion from EVT to MVT to MVT::SimpleValueType just to assign back to EVT. NFC
1 parent 909d7bf commit 5a56d2a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ SDValue DAGTypeLegalizer::SoftenFloatOp_LROUND(SDNode *N) {
10431043
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
10441044

10451045
SDValue Op = GetSoftenedFloat(N->getOperand(0));
1046-
EVT RetVT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
1046+
EVT RetVT = N->getOperand(0).getValueType();
10471047
TargetLowering::MakeLibCallOptions CallOptions;
10481048
EVT OpsVT[1] = { N->getOperand(0).getValueType() };
10491049
CallOptions.setTypeListBeforeSoften(OpsVT, N->getValueType(0), true);
@@ -1060,7 +1060,7 @@ SDValue DAGTypeLegalizer::SoftenFloatOp_LLROUND(SDNode *N) {
10601060
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
10611061

10621062
SDValue Op = GetSoftenedFloat(N->getOperand(0));
1063-
EVT RetVT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
1063+
EVT RetVT = N->getOperand(0).getValueType();
10641064
TargetLowering::MakeLibCallOptions CallOptions;
10651065
EVT OpsVT[1] = { N->getOperand(0).getValueType() };
10661066
CallOptions.setTypeListBeforeSoften(OpsVT, N->getValueType(0), true);
@@ -1077,7 +1077,7 @@ SDValue DAGTypeLegalizer::SoftenFloatOp_LRINT(SDNode *N) {
10771077
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
10781078

10791079
SDValue Op = GetSoftenedFloat(N->getOperand(0));
1080-
EVT RetVT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
1080+
EVT RetVT = N->getOperand(0).getValueType();
10811081
TargetLowering::MakeLibCallOptions CallOptions;
10821082
EVT OpsVT[1] = { N->getOperand(0).getValueType() };
10831083
CallOptions.setTypeListBeforeSoften(OpsVT, N->getValueType(0), true);
@@ -1094,7 +1094,7 @@ SDValue DAGTypeLegalizer::SoftenFloatOp_LLRINT(SDNode *N) {
10941094
EVT NVT = TLI.getTypeToTransformTo(*DAG.getContext(), N->getValueType(0));
10951095

10961096
SDValue Op = GetSoftenedFloat(N->getOperand(0));
1097-
EVT RetVT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
1097+
EVT RetVT = N->getOperand(0).getValueType();
10981098
TargetLowering::MakeLibCallOptions CallOptions;
10991099
EVT OpsVT[1] = { N->getOperand(0).getValueType() };
11001100
CallOptions.setTypeListBeforeSoften(OpsVT, N->getValueType(0), true);
@@ -1833,7 +1833,7 @@ SDValue DAGTypeLegalizer::ExpandFloatOp_STORE(SDNode *N, unsigned OpNo) {
18331833

18341834
SDValue DAGTypeLegalizer::ExpandFloatOp_LROUND(SDNode *N) {
18351835
EVT RVT = N->getValueType(0);
1836-
EVT RetVT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
1836+
EVT RetVT = N->getOperand(0).getValueType();
18371837
TargetLowering::MakeLibCallOptions CallOptions;
18381838
return TLI.makeLibCall(DAG, GetFPLibCall(RetVT,
18391839
RTLIB::LROUND_F32,
@@ -1846,7 +1846,7 @@ SDValue DAGTypeLegalizer::ExpandFloatOp_LROUND(SDNode *N) {
18461846

18471847
SDValue DAGTypeLegalizer::ExpandFloatOp_LLROUND(SDNode *N) {
18481848
EVT RVT = N->getValueType(0);
1849-
EVT RetVT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
1849+
EVT RetVT = N->getOperand(0).getValueType();
18501850
TargetLowering::MakeLibCallOptions CallOptions;
18511851
return TLI.makeLibCall(DAG, GetFPLibCall(RetVT,
18521852
RTLIB::LLROUND_F32,
@@ -1859,7 +1859,7 @@ SDValue DAGTypeLegalizer::ExpandFloatOp_LLROUND(SDNode *N) {
18591859

18601860
SDValue DAGTypeLegalizer::ExpandFloatOp_LRINT(SDNode *N) {
18611861
EVT RVT = N->getValueType(0);
1862-
EVT RetVT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
1862+
EVT RetVT = N->getOperand(0).getValueType();
18631863
TargetLowering::MakeLibCallOptions CallOptions;
18641864
return TLI.makeLibCall(DAG, GetFPLibCall(RetVT,
18651865
RTLIB::LRINT_F32,
@@ -1872,7 +1872,7 @@ SDValue DAGTypeLegalizer::ExpandFloatOp_LRINT(SDNode *N) {
18721872

18731873
SDValue DAGTypeLegalizer::ExpandFloatOp_LLRINT(SDNode *N) {
18741874
EVT RVT = N->getValueType(0);
1875-
EVT RetVT = N->getOperand(0).getValueType().getSimpleVT().SimpleTy;
1875+
EVT RetVT = N->getOperand(0).getValueType();
18761876
TargetLowering::MakeLibCallOptions CallOptions;
18771877
return TLI.makeLibCall(DAG, GetFPLibCall(RetVT,
18781878
RTLIB::LLRINT_F32,

0 commit comments

Comments
 (0)