Skip to content

Commit c533017

Browse files
authored
[AArch64][GlobalISel] Add codegen for simd fpcvt intrinsics (llvm#157680)
This patch is a first in a series of patches that add codegen support for fcvt instructions that keep the result in 32-bit or 64-bit SIMD&FP registers. For a long time, LLVM primarily generated fpcvt instructions, which store the result in GPRs, resulting in extra moves when the value was used by NEON instructions that operate on SIMD&FP registers. Although patterns existed for generating the SIMD variants, they relied on single-element vector types (such as v1i32 or v1i64) to decide whether the SIMD variant should be selected. This was not useful, because many NEON intrinsics and other LLVM IR operations use scalar types (i32/i64) even though they expect the result to be stored in SIMD&FP registers. This patch is part of a series that addresses this and also adds support for generating these instructions in GlobalISel. To fix this in SelectionDAG, bitcasts of the result to a floating-point type serve as a hint that the SIMD variant of the conversion should be used, rather than relying on single-element vector types. These bitcasts are not currently generated by LLVM, but the goal is to add explicit bitcasts to the inputs and outputs of NEON intrinsics operating on integers in follow-up patches. For GlobalISel, the register bank selection algorithm is used to determine which variant to generate
1 parent 2a82e71 commit c533017

File tree

5 files changed

+759
-88
lines changed

5 files changed

+759
-88
lines changed

llvm/lib/Target/AArch64/AArch64InstrFormats.td

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5301,28 +5301,29 @@ multiclass FPToIntegerUnscaled<bits<2> rmode, bits<3> opcode, string asm,
53015301
}
53025302
}
53035303

5304-
multiclass FPToIntegerSIMDScalar<bits<2> rmode, bits<3> opcode, string asm> {
5304+
multiclass FPToIntegerSIMDScalar<bits<2> rmode, bits<3> opcode, string asm,
5305+
SDPatternOperator OpN = null_frag> {
53055306
// double-precision to 32-bit SIMD/FPR
53065307
def SDr : BaseFPToIntegerUnscaled<0b01, rmode, opcode, FPR64, FPR32, asm,
5307-
[]> {
5308+
[(set FPR32:$Rd, (i32 (OpN (f64 FPR64:$Rn))))]> {
53085309
let Inst{31} = 0; // 32-bit FPR flag
53095310
}
53105311

53115312
// half-precision to 32-bit SIMD/FPR
53125313
def SHr : BaseFPToIntegerUnscaled<0b11, rmode, opcode, FPR16, FPR32, asm,
5313-
[]> {
5314+
[(set FPR32:$Rd, (i32 (OpN (f16 FPR16:$Rn))))]> {
53145315
let Inst{31} = 0; // 32-bit FPR flag
53155316
}
53165317

53175318
// half-precision to 64-bit SIMD/FPR
53185319
def DHr : BaseFPToIntegerUnscaled<0b11, rmode, opcode, FPR16, FPR64, asm,
5319-
[]> {
5320+
[(set FPR64:$Rd, (i64 (OpN (f16 FPR16:$Rn))))]> {
53205321
let Inst{31} = 1; // 64-bit FPR flag
53215322
}
53225323

53235324
// single-precision to 64-bit SIMD/FPR
53245325
def DSr : BaseFPToIntegerUnscaled<0b00, rmode, opcode, FPR32, FPR64, asm,
5325-
[]> {
5326+
[(set FPR64:$Rd, (i64 (OpN (f32 FPR32:$Rn))))]> {
53265327
let Inst{31} = 1; // 64-bit FPR flag
53275328
}
53285329
}
@@ -7940,14 +7941,18 @@ multiclass SIMDTwoScalarD<bit U, bits<5> opc, string asm,
79407941
}
79417942
}
79427943

7943-
let mayRaiseFPException = 1, Uses = [FPCR] in
7944-
multiclass SIMDFPTwoScalar<bit U, bit S, bits<5> opc, string asm> {
7944+
let mayRaiseFPException = 1, Uses = [FPCR], FastISelShouldIgnore = 1 in
7945+
multiclass SIMDFPTwoScalar<bit U, bit S, bits<5> opc, string asm,
7946+
SDPatternOperator OpN = null_frag> {
79457947
let Predicates = [HasNEONandIsStreamingSafe] in {
7946-
def v1i64 : BaseSIMDTwoScalar<U, {S,1}, 0b00, opc, FPR64, FPR64, asm,[]>;
7947-
def v1i32 : BaseSIMDTwoScalar<U, {S,0}, 0b00, opc, FPR32, FPR32, asm,[]>;
7948+
def v1i64 : BaseSIMDTwoScalar<U, {S,1}, 0b00, opc, FPR64, FPR64, asm,
7949+
[(set (i64 FPR64:$Rd), (OpN (f64 FPR64:$Rn)))]>;
7950+
def v1i32 : BaseSIMDTwoScalar<U, {S,0}, 0b00, opc, FPR32, FPR32, asm,
7951+
[(set FPR32:$Rd, (i32 (OpN (f32 FPR32:$Rn))))]>;
79487952
}
79497953
let Predicates = [HasNEONandIsStreamingSafe, HasFullFP16] in {
7950-
def v1f16 : BaseSIMDTwoScalar<U, {S,1}, 0b11, opc, FPR16, FPR16, asm,[]>;
7954+
def v1f16 : BaseSIMDTwoScalar<U, {S,1}, 0b11, opc, FPR16, FPR16, asm,
7955+
[(set FPR16:$Rd, (i16 (OpN (f16 FPR16:$Rn))))]>;
79517956
}
79527957
}
79537958

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 97 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5231,18 +5231,19 @@ defm FCVTZS : FPToIntegerScaled<0b11, 0b000, "fcvtzs", any_fp_to_sint>;
52315231
defm FCVTZU : FPToIntegerScaled<0b11, 0b001, "fcvtzu", any_fp_to_uint>;
52325232

52335233
let Predicates = [HasNEON, HasFPRCVT] in{
5234-
defm FCVTAS : FPToIntegerSIMDScalar<0b11, 0b010, "fcvtas">;
5235-
defm FCVTAU : FPToIntegerSIMDScalar<0b11, 0b011, "fcvtau">;
5236-
defm FCVTMS : FPToIntegerSIMDScalar<0b10, 0b100, "fcvtms">;
5237-
defm FCVTMU : FPToIntegerSIMDScalar<0b10, 0b101, "fcvtmu">;
5238-
defm FCVTNS : FPToIntegerSIMDScalar<0b01, 0b010, "fcvtns">;
5239-
defm FCVTNU : FPToIntegerSIMDScalar<0b01, 0b011, "fcvtnu">;
5240-
defm FCVTPS : FPToIntegerSIMDScalar<0b10, 0b010, "fcvtps">;
5241-
defm FCVTPU : FPToIntegerSIMDScalar<0b10, 0b011, "fcvtpu">;
5234+
defm FCVTAS : FPToIntegerSIMDScalar<0b11, 0b010, "fcvtas", int_aarch64_neon_fcvtas>;
5235+
defm FCVTAU : FPToIntegerSIMDScalar<0b11, 0b011, "fcvtau", int_aarch64_neon_fcvtau>;
5236+
defm FCVTMS : FPToIntegerSIMDScalar<0b10, 0b100, "fcvtms", int_aarch64_neon_fcvtms>;
5237+
defm FCVTMU : FPToIntegerSIMDScalar<0b10, 0b101, "fcvtmu", int_aarch64_neon_fcvtmu>;
5238+
defm FCVTNS : FPToIntegerSIMDScalar<0b01, 0b010, "fcvtns", int_aarch64_neon_fcvtns>;
5239+
defm FCVTNU : FPToIntegerSIMDScalar<0b01, 0b011, "fcvtnu", int_aarch64_neon_fcvtnu>;
5240+
defm FCVTPS : FPToIntegerSIMDScalar<0b10, 0b010, "fcvtps", int_aarch64_neon_fcvtps>;
5241+
defm FCVTPU : FPToIntegerSIMDScalar<0b10, 0b011, "fcvtpu", int_aarch64_neon_fcvtpu>;
52425242
defm FCVTZS : FPToIntegerSIMDScalar<0b10, 0b110, "fcvtzs">;
52435243
defm FCVTZU : FPToIntegerSIMDScalar<0b10, 0b111, "fcvtzu">;
52445244
}
52455245

5246+
52465247
// AArch64's FCVT instructions saturate when out of range.
52475248
multiclass FPToIntegerSatPats<SDNode to_int_sat, SDNode to_int_sat_gi, string INST> {
52485249
let Predicates = [HasFullFP16] in {
@@ -5309,35 +5310,6 @@ multiclass FPToIntegerSatPats<SDNode to_int_sat, SDNode to_int_sat_gi, string IN
53095310
defm : FPToIntegerSatPats<fp_to_sint_sat, fp_to_sint_sat_gi, "FCVTZS">;
53105311
defm : FPToIntegerSatPats<fp_to_uint_sat, fp_to_uint_sat_gi, "FCVTZU">;
53115312

5312-
multiclass FPToIntegerIntPats<Intrinsic round, string INST> {
5313-
let Predicates = [HasFullFP16] in {
5314-
def : Pat<(i32 (round f16:$Rn)), (!cast<Instruction>(INST # UWHr) $Rn)>;
5315-
def : Pat<(i64 (round f16:$Rn)), (!cast<Instruction>(INST # UXHr) $Rn)>;
5316-
}
5317-
def : Pat<(i32 (round f32:$Rn)), (!cast<Instruction>(INST # UWSr) $Rn)>;
5318-
def : Pat<(i64 (round f32:$Rn)), (!cast<Instruction>(INST # UXSr) $Rn)>;
5319-
def : Pat<(i32 (round f64:$Rn)), (!cast<Instruction>(INST # UWDr) $Rn)>;
5320-
def : Pat<(i64 (round f64:$Rn)), (!cast<Instruction>(INST # UXDr) $Rn)>;
5321-
5322-
let Predicates = [HasFullFP16] in {
5323-
def : Pat<(i32 (round (fmul f16:$Rn, fixedpoint_f16_i32:$scale))),
5324-
(!cast<Instruction>(INST # SWHri) $Rn, $scale)>;
5325-
def : Pat<(i64 (round (fmul f16:$Rn, fixedpoint_f16_i64:$scale))),
5326-
(!cast<Instruction>(INST # SXHri) $Rn, $scale)>;
5327-
}
5328-
def : Pat<(i32 (round (fmul f32:$Rn, fixedpoint_f32_i32:$scale))),
5329-
(!cast<Instruction>(INST # SWSri) $Rn, $scale)>;
5330-
def : Pat<(i64 (round (fmul f32:$Rn, fixedpoint_f32_i64:$scale))),
5331-
(!cast<Instruction>(INST # SXSri) $Rn, $scale)>;
5332-
def : Pat<(i32 (round (fmul f64:$Rn, fixedpoint_f64_i32:$scale))),
5333-
(!cast<Instruction>(INST # SWDri) $Rn, $scale)>;
5334-
def : Pat<(i64 (round (fmul f64:$Rn, fixedpoint_f64_i64:$scale))),
5335-
(!cast<Instruction>(INST # SXDri) $Rn, $scale)>;
5336-
}
5337-
5338-
defm : FPToIntegerIntPats<int_aarch64_neon_fcvtzs, "FCVTZS">;
5339-
defm : FPToIntegerIntPats<int_aarch64_neon_fcvtzu, "FCVTZU">;
5340-
53415313
multiclass FPToIntegerPats<SDNode to_int, SDNode to_int_sat, SDNode round, string INST> {
53425314
def : Pat<(i32 (to_int (round f32:$Rn))),
53435315
(!cast<Instruction>(INST # UWSr) f32:$Rn)>;
@@ -6572,14 +6544,14 @@ defm FCMGE : SIMDFPCmpTwoScalar<1, 1, 0b01100, "fcmge", AArch64fcmgez>;
65726544
defm FCMGT : SIMDFPCmpTwoScalar<0, 1, 0b01100, "fcmgt", AArch64fcmgtz>;
65736545
defm FCMLE : SIMDFPCmpTwoScalar<1, 1, 0b01101, "fcmle", AArch64fcmlez>;
65746546
defm FCMLT : SIMDFPCmpTwoScalar<0, 1, 0b01110, "fcmlt", AArch64fcmltz>;
6575-
defm FCVTAS : SIMDFPTwoScalar< 0, 0, 0b11100, "fcvtas">;
6576-
defm FCVTAU : SIMDFPTwoScalar< 1, 0, 0b11100, "fcvtau">;
6577-
defm FCVTMS : SIMDFPTwoScalar< 0, 0, 0b11011, "fcvtms">;
6578-
defm FCVTMU : SIMDFPTwoScalar< 1, 0, 0b11011, "fcvtmu">;
6579-
defm FCVTNS : SIMDFPTwoScalar< 0, 0, 0b11010, "fcvtns">;
6580-
defm FCVTNU : SIMDFPTwoScalar< 1, 0, 0b11010, "fcvtnu">;
6581-
defm FCVTPS : SIMDFPTwoScalar< 0, 1, 0b11010, "fcvtps">;
6582-
defm FCVTPU : SIMDFPTwoScalar< 1, 1, 0b11010, "fcvtpu">;
6547+
defm FCVTAS : SIMDFPTwoScalar< 0, 0, 0b11100, "fcvtas", int_aarch64_neon_fcvtas>;
6548+
defm FCVTAU : SIMDFPTwoScalar< 1, 0, 0b11100, "fcvtau", int_aarch64_neon_fcvtau>;
6549+
defm FCVTMS : SIMDFPTwoScalar< 0, 0, 0b11011, "fcvtms", int_aarch64_neon_fcvtms>;
6550+
defm FCVTMU : SIMDFPTwoScalar< 1, 0, 0b11011, "fcvtmu", int_aarch64_neon_fcvtmu>;
6551+
defm FCVTNS : SIMDFPTwoScalar< 0, 0, 0b11010, "fcvtns", int_aarch64_neon_fcvtns>;
6552+
defm FCVTNU : SIMDFPTwoScalar< 1, 0, 0b11010, "fcvtnu", int_aarch64_neon_fcvtnu>;
6553+
defm FCVTPS : SIMDFPTwoScalar< 0, 1, 0b11010, "fcvtps", int_aarch64_neon_fcvtps>;
6554+
defm FCVTPU : SIMDFPTwoScalar< 1, 1, 0b11010, "fcvtpu", int_aarch64_neon_fcvtpu>;
65836555
def FCVTXNv1i64 : SIMDInexactCvtTwoScalar<0b10110, "fcvtxn">;
65846556
defm FCVTZS : SIMDFPTwoScalar< 0, 1, 0b11011, "fcvtzs">;
65856557
defm FCVTZU : SIMDFPTwoScalar< 1, 1, 0b11011, "fcvtzu">;
@@ -6600,6 +6572,86 @@ defm UQXTN : SIMDTwoScalarMixedBHS<1, 0b10100, "uqxtn", int_aarch64_neon_scalar
66006572
defm USQADD : SIMDTwoScalarBHSDTied< 1, 0b00011, "usqadd",
66016573
int_aarch64_neon_usqadd>;
66026574

6575+
// Floating-point conversion patterns.
6576+
multiclass FPToIntegerSIMDScalarPatterns<SDPatternOperator OpN, string INST> {
6577+
def : Pat<(f32 (bitconvert (i32 (OpN (f64 FPR64:$Rn))))),
6578+
(!cast<Instruction>(INST # SDr) FPR64:$Rn)>;
6579+
def : Pat<(f32 (bitconvert (i32 (OpN (f16 FPR16:$Rn))))),
6580+
(!cast<Instruction>(INST # SHr) FPR16:$Rn)>;
6581+
def : Pat<(f64 (bitconvert (i64 (OpN (f16 FPR16:$Rn))))),
6582+
(!cast<Instruction>(INST # DHr) FPR16:$Rn)>;
6583+
def : Pat<(f64 (bitconvert (i64 (OpN (f32 FPR32:$Rn))))),
6584+
(!cast<Instruction>(INST # DSr) FPR32:$Rn)>;
6585+
def : Pat<(f32 (bitconvert (i32 (OpN (f32 FPR32:$Rn))))),
6586+
(!cast<Instruction>(INST # v1i32) FPR32:$Rn)>;
6587+
def : Pat<(f64 (bitconvert (i64 (OpN (f64 FPR64:$Rn))))),
6588+
(!cast<Instruction>(INST # v1i64) FPR64:$Rn)>;
6589+
6590+
}
6591+
defm: FPToIntegerSIMDScalarPatterns<int_aarch64_neon_fcvtas, "FCVTAS">;
6592+
defm: FPToIntegerSIMDScalarPatterns<int_aarch64_neon_fcvtau, "FCVTAU">;
6593+
defm: FPToIntegerSIMDScalarPatterns<int_aarch64_neon_fcvtms, "FCVTMS">;
6594+
defm: FPToIntegerSIMDScalarPatterns<int_aarch64_neon_fcvtmu, "FCVTMU">;
6595+
defm: FPToIntegerSIMDScalarPatterns<int_aarch64_neon_fcvtns, "FCVTNS">;
6596+
defm: FPToIntegerSIMDScalarPatterns<int_aarch64_neon_fcvtnu, "FCVTNU">;
6597+
defm: FPToIntegerSIMDScalarPatterns<int_aarch64_neon_fcvtps, "FCVTPS">;
6598+
defm: FPToIntegerSIMDScalarPatterns<int_aarch64_neon_fcvtpu, "FCVTPU">;
6599+
6600+
multiclass FPToIntegerIntPats<Intrinsic round, string INST> {
6601+
let Predicates = [HasFullFP16] in {
6602+
def : Pat<(i32 (round f16:$Rn)), (!cast<Instruction>(INST # UWHr) $Rn)>;
6603+
def : Pat<(i64 (round f16:$Rn)), (!cast<Instruction>(INST # UXHr) $Rn)>;
6604+
}
6605+
def : Pat<(i32 (round f32:$Rn)), (!cast<Instruction>(INST # UWSr) $Rn)>;
6606+
def : Pat<(i64 (round f32:$Rn)), (!cast<Instruction>(INST # UXSr) $Rn)>;
6607+
def : Pat<(i32 (round f64:$Rn)), (!cast<Instruction>(INST # UWDr) $Rn)>;
6608+
def : Pat<(i64 (round f64:$Rn)), (!cast<Instruction>(INST # UXDr) $Rn)>;
6609+
6610+
// For global-isel we can use register classes to determine
6611+
// which FCVT instruction to use.
6612+
let Predicates = [HasFPRCVT] in {
6613+
def : Pat<(i32 (round f16:$Rn)), (!cast<Instruction>(INST # SHr) $Rn)>;
6614+
def : Pat<(i64 (round f16:$Rn)), (!cast<Instruction>(INST # DHr) $Rn)>;
6615+
def : Pat<(i64 (round f32:$Rn)), (!cast<Instruction>(INST # DSr) $Rn)>;
6616+
def : Pat<(i32 (round f64:$Rn)), (!cast<Instruction>(INST # SDr) $Rn)>;
6617+
}
6618+
def : Pat<(i32 (round f32:$Rn)), (!cast<Instruction>(INST # v1i32) $Rn)>;
6619+
def : Pat<(i64 (round f64:$Rn)), (!cast<Instruction>(INST # v1i64) $Rn)>;
6620+
6621+
let Predicates = [HasFPRCVT] in {
6622+
def : Pat<(f32 (bitconvert (i32 (round f16:$Rn)))),
6623+
(!cast<Instruction>(INST # SHr) $Rn)>;
6624+
def : Pat<(f64 (bitconvert (i64 (round f16:$Rn)))),
6625+
(!cast<Instruction>(INST # DHr) $Rn)>;
6626+
def : Pat<(f64 (bitconvert (i64 (round f32:$Rn)))),
6627+
(!cast<Instruction>(INST # DSr) $Rn)>;
6628+
def : Pat<(f32 (bitconvert (i32 (round f64:$Rn)))),
6629+
(!cast<Instruction>(INST # SDr) $Rn)>;
6630+
}
6631+
def : Pat<(f32 (bitconvert (i32 (round f32:$Rn)))),
6632+
(!cast<Instruction>(INST # v1i32) $Rn)>;
6633+
def : Pat<(f64 (bitconvert (i64 (round f64:$Rn)))),
6634+
(!cast<Instruction>(INST # v1i64) $Rn)>;
6635+
6636+
let Predicates = [HasFullFP16] in {
6637+
def : Pat<(i32 (round (fmul f16:$Rn, fixedpoint_f16_i32:$scale))),
6638+
(!cast<Instruction>(INST # SWHri) $Rn, $scale)>;
6639+
def : Pat<(i64 (round (fmul f16:$Rn, fixedpoint_f16_i64:$scale))),
6640+
(!cast<Instruction>(INST # SXHri) $Rn, $scale)>;
6641+
}
6642+
def : Pat<(i32 (round (fmul f32:$Rn, fixedpoint_f32_i32:$scale))),
6643+
(!cast<Instruction>(INST # SWSri) $Rn, $scale)>;
6644+
def : Pat<(i64 (round (fmul f32:$Rn, fixedpoint_f32_i64:$scale))),
6645+
(!cast<Instruction>(INST # SXSri) $Rn, $scale)>;
6646+
def : Pat<(i32 (round (fmul f64:$Rn, fixedpoint_f64_i32:$scale))),
6647+
(!cast<Instruction>(INST # SWDri) $Rn, $scale)>;
6648+
def : Pat<(i64 (round (fmul f64:$Rn, fixedpoint_f64_i64:$scale))),
6649+
(!cast<Instruction>(INST # SXDri) $Rn, $scale)>;
6650+
}
6651+
6652+
defm : FPToIntegerIntPats<int_aarch64_neon_fcvtzs, "FCVTZS">;
6653+
defm : FPToIntegerIntPats<int_aarch64_neon_fcvtzu, "FCVTZU">;
6654+
66036655
// f16 -> s16 conversions
66046656
let Predicates = [HasFullFP16] in {
66056657
def : Pat<(i16(fp_to_sint_sat_gi f16:$Rn)), (FCVTZSv1f16 f16:$Rn)>;

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

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,7 @@ bool AArch64RegisterBankInfo::onlyUsesFP(const MachineInstr &MI,
573573
case Intrinsic::aarch64_neon_fcvtnu:
574574
case Intrinsic::aarch64_neon_fcvtps:
575575
case Intrinsic::aarch64_neon_fcvtpu:
576-
// Force FPR register bank for half types, as those types otherwise
577-
// don't get legalized correctly resulting in fp16 <-> gpr32 COPY's.
578-
return MRI.getType(MI.getOperand(2).getReg()) == LLT::float16();
576+
return true;
579577
default:
580578
break;
581579
}
@@ -1148,6 +1146,34 @@ AArch64RegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
11481146
case TargetOpcode::G_INTRINSIC:
11491147
case TargetOpcode::G_INTRINSIC_W_SIDE_EFFECTS: {
11501148
switch (cast<GIntrinsic>(MI).getIntrinsicID()) {
1149+
case Intrinsic::aarch64_neon_fcvtas:
1150+
case Intrinsic::aarch64_neon_fcvtau:
1151+
case Intrinsic::aarch64_neon_fcvtzs:
1152+
case Intrinsic::aarch64_neon_fcvtzu:
1153+
case Intrinsic::aarch64_neon_fcvtms:
1154+
case Intrinsic::aarch64_neon_fcvtmu:
1155+
case Intrinsic::aarch64_neon_fcvtns:
1156+
case Intrinsic::aarch64_neon_fcvtnu:
1157+
case Intrinsic::aarch64_neon_fcvtps:
1158+
case Intrinsic::aarch64_neon_fcvtpu: {
1159+
OpRegBankIdx[2] = PMI_FirstFPR;
1160+
if (MRI.getType(MI.getOperand(0).getReg()).isVector()) {
1161+
OpRegBankIdx[0] = PMI_FirstFPR;
1162+
break;
1163+
}
1164+
TypeSize DstSize = getSizeInBits(MI.getOperand(0).getReg(), MRI, TRI);
1165+
TypeSize SrcSize = getSizeInBits(MI.getOperand(2).getReg(), MRI, TRI);
1166+
if (((DstSize == SrcSize) || STI.hasFeature(AArch64::FeatureFPRCVT)) &&
1167+
all_of(MRI.use_nodbg_instructions(MI.getOperand(0).getReg()),
1168+
[&](const MachineInstr &UseMI) {
1169+
return onlyUsesFP(UseMI, MRI, TRI) ||
1170+
prefersFPUse(UseMI, MRI, TRI);
1171+
}))
1172+
OpRegBankIdx[0] = PMI_FirstFPR;
1173+
else
1174+
OpRegBankIdx[0] = PMI_FirstGPR;
1175+
break;
1176+
}
11511177
case Intrinsic::aarch64_neon_vcvtfxs2fp:
11521178
case Intrinsic::aarch64_neon_vcvtfxu2fp:
11531179
case Intrinsic::aarch64_neon_vcvtfp2fxs:

0 commit comments

Comments
 (0)