@@ -1102,7 +1102,8 @@ static bool selectCopy(MachineInstr &I, const TargetInstrInfo &TII,
1102
1102
return true ;
1103
1103
}
1104
1104
1105
- static unsigned selectFPConvOpc (unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
1105
+ static unsigned selectIntToFPConvOpc (unsigned GenericOpc, LLT DstTy,
1106
+ LLT SrcTy) {
1106
1107
if (!DstTy.isScalar () || !SrcTy.isScalar ())
1107
1108
return GenericOpc;
1108
1109
@@ -1118,10 +1119,6 @@ static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
1118
1119
return AArch64::SCVTFUWSri;
1119
1120
case TargetOpcode::G_UITOFP:
1120
1121
return AArch64::UCVTFUWSri;
1121
- case TargetOpcode::G_FPTOSI:
1122
- return AArch64::FCVTZSUWSr;
1123
- case TargetOpcode::G_FPTOUI:
1124
- return AArch64::FCVTZUUWSr;
1125
1122
default :
1126
1123
return GenericOpc;
1127
1124
}
@@ -1131,10 +1128,6 @@ static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
1131
1128
return AArch64::SCVTFUXSri;
1132
1129
case TargetOpcode::G_UITOFP:
1133
1130
return AArch64::UCVTFUXSri;
1134
- case TargetOpcode::G_FPTOSI:
1135
- return AArch64::FCVTZSUWDr;
1136
- case TargetOpcode::G_FPTOUI:
1137
- return AArch64::FCVTZUUWDr;
1138
1131
default :
1139
1132
return GenericOpc;
1140
1133
}
@@ -1149,10 +1142,6 @@ static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
1149
1142
return AArch64::SCVTFUWDri;
1150
1143
case TargetOpcode::G_UITOFP:
1151
1144
return AArch64::UCVTFUWDri;
1152
- case TargetOpcode::G_FPTOSI:
1153
- return AArch64::FCVTZSUXSr;
1154
- case TargetOpcode::G_FPTOUI:
1155
- return AArch64::FCVTZUUXSr;
1156
1145
default :
1157
1146
return GenericOpc;
1158
1147
}
@@ -1162,10 +1151,6 @@ static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
1162
1151
return AArch64::SCVTFUXDri;
1163
1152
case TargetOpcode::G_UITOFP:
1164
1153
return AArch64::UCVTFUXDri;
1165
- case TargetOpcode::G_FPTOSI:
1166
- return AArch64::FCVTZSUXDr;
1167
- case TargetOpcode::G_FPTOUI:
1168
- return AArch64::FCVTZUUXDr;
1169
1154
default :
1170
1155
return GenericOpc;
1171
1156
}
@@ -3525,12 +3510,10 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
3525
3510
}
3526
3511
3527
3512
case TargetOpcode::G_SITOFP:
3528
- case TargetOpcode::G_UITOFP:
3529
- case TargetOpcode::G_FPTOSI:
3530
- case TargetOpcode::G_FPTOUI: {
3513
+ case TargetOpcode::G_UITOFP: {
3531
3514
const LLT DstTy = MRI.getType (I.getOperand (0 ).getReg ()),
3532
3515
SrcTy = MRI.getType (I.getOperand (1 ).getReg ());
3533
- const unsigned NewOpc = selectFPConvOpc (Opcode, DstTy, SrcTy);
3516
+ const unsigned NewOpc = selectIntToFPConvOpc (Opcode, DstTy, SrcTy);
3534
3517
if (NewOpc == Opcode)
3535
3518
return false ;
3536
3519
0 commit comments