Skip to content

Commit bd94aab

Browse files
authored
[AArch64][GlobalISel] Remove Selection code for s/uitofp. NFC (#154488)
These are already handled by tablegen patterns.
1 parent b0d0e04 commit bd94aab

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,8 @@ static bool selectCopy(MachineInstr &I, const TargetInstrInfo &TII,
11021102
return true;
11031103
}
11041104

1105-
static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
1105+
static unsigned selectIntToFPConvOpc(unsigned GenericOpc, LLT DstTy,
1106+
LLT SrcTy) {
11061107
if (!DstTy.isScalar() || !SrcTy.isScalar())
11071108
return GenericOpc;
11081109

@@ -1118,10 +1119,6 @@ static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
11181119
return AArch64::SCVTFUWSri;
11191120
case TargetOpcode::G_UITOFP:
11201121
return AArch64::UCVTFUWSri;
1121-
case TargetOpcode::G_FPTOSI:
1122-
return AArch64::FCVTZSUWSr;
1123-
case TargetOpcode::G_FPTOUI:
1124-
return AArch64::FCVTZUUWSr;
11251122
default:
11261123
return GenericOpc;
11271124
}
@@ -1131,10 +1128,6 @@ static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
11311128
return AArch64::SCVTFUXSri;
11321129
case TargetOpcode::G_UITOFP:
11331130
return AArch64::UCVTFUXSri;
1134-
case TargetOpcode::G_FPTOSI:
1135-
return AArch64::FCVTZSUWDr;
1136-
case TargetOpcode::G_FPTOUI:
1137-
return AArch64::FCVTZUUWDr;
11381131
default:
11391132
return GenericOpc;
11401133
}
@@ -1149,10 +1142,6 @@ static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
11491142
return AArch64::SCVTFUWDri;
11501143
case TargetOpcode::G_UITOFP:
11511144
return AArch64::UCVTFUWDri;
1152-
case TargetOpcode::G_FPTOSI:
1153-
return AArch64::FCVTZSUXSr;
1154-
case TargetOpcode::G_FPTOUI:
1155-
return AArch64::FCVTZUUXSr;
11561145
default:
11571146
return GenericOpc;
11581147
}
@@ -1162,10 +1151,6 @@ static unsigned selectFPConvOpc(unsigned GenericOpc, LLT DstTy, LLT SrcTy) {
11621151
return AArch64::SCVTFUXDri;
11631152
case TargetOpcode::G_UITOFP:
11641153
return AArch64::UCVTFUXDri;
1165-
case TargetOpcode::G_FPTOSI:
1166-
return AArch64::FCVTZSUXDr;
1167-
case TargetOpcode::G_FPTOUI:
1168-
return AArch64::FCVTZUUXDr;
11691154
default:
11701155
return GenericOpc;
11711156
}
@@ -3525,12 +3510,10 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
35253510
}
35263511

35273512
case TargetOpcode::G_SITOFP:
3528-
case TargetOpcode::G_UITOFP:
3529-
case TargetOpcode::G_FPTOSI:
3530-
case TargetOpcode::G_FPTOUI: {
3513+
case TargetOpcode::G_UITOFP: {
35313514
const LLT DstTy = MRI.getType(I.getOperand(0).getReg()),
35323515
SrcTy = MRI.getType(I.getOperand(1).getReg());
3533-
const unsigned NewOpc = selectFPConvOpc(Opcode, DstTy, SrcTy);
3516+
const unsigned NewOpc = selectIntToFPConvOpc(Opcode, DstTy, SrcTy);
35343517
if (NewOpc == Opcode)
35353518
return false;
35363519

0 commit comments

Comments
 (0)