Skip to content

Commit 9c56a61

Browse files
committed
[RISCV] Combine two hasStdExtZfhminOrZhinxmin() blocks in RISCVTargetLowering constructor. NFC
1 parent c7cf2cc commit 9c56a61

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,6 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
431431
ISD::FCEIL, ISD::FFLOOR, ISD::FTRUNC, ISD::FRINT, ISD::FROUND,
432432
ISD::FROUNDEVEN};
433433

434-
if (Subtarget.hasStdExtZfhminOrZhinxmin())
435-
setOperationAction(ISD::BITCAST, MVT::i16, Custom);
436-
437434
static const unsigned ZfhminZfbfminPromoteOps[] = {
438435
ISD::FMINNUM, ISD::FMAXNUM, ISD::FMAXIMUMNUM,
439436
ISD::FMINIMUMNUM, ISD::FADD, ISD::FSUB,
@@ -484,6 +481,8 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
484481
setOperationAction({ISD::SINT_TO_FP, ISD::UINT_TO_FP}, XLenVT, Custom);
485482
}
486483

484+
setOperationAction(ISD::BITCAST, MVT::i16, Custom);
485+
487486
setOperationAction(ISD::STRICT_FP_ROUND, MVT::f16, Legal);
488487
setOperationAction(ISD::STRICT_FP_EXTEND, MVT::f32, Legal);
489488
setCondCodeAction(FPCCToExpand, MVT::f16, Expand);

0 commit comments

Comments
 (0)