[llvm] 9c56a61 - [RISCV] Combine two hasStdExtZfhminOrZhinxmin() blocks in RISCVTargetLowering constructor. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 11 22:57:54 PDT 2024
Author: Craig Topper
Date: 2024-09-11T22:47:56-07:00
New Revision: 9c56a611057692007aab22ef6abde0a02b9a40da
URL: https://github.com/llvm/llvm-project/commit/9c56a611057692007aab22ef6abde0a02b9a40da
DIFF: https://github.com/llvm/llvm-project/commit/9c56a611057692007aab22ef6abde0a02b9a40da.diff
LOG: [RISCV] Combine two hasStdExtZfhminOrZhinxmin() blocks in RISCVTargetLowering constructor. NFC
Added:
Modified:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index b0d79f4367e837..ab52f977c344dd 100644
--- a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@ -431,9 +431,6 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
ISD::FCEIL, ISD::FFLOOR, ISD::FTRUNC, ISD::FRINT, ISD::FROUND,
ISD::FROUNDEVEN};
- if (Subtarget.hasStdExtZfhminOrZhinxmin())
- setOperationAction(ISD::BITCAST, MVT::i16, Custom);
-
static const unsigned ZfhminZfbfminPromoteOps[] = {
ISD::FMINNUM, ISD::FMAXNUM, ISD::FMAXIMUMNUM,
ISD::FMINIMUMNUM, ISD::FADD, ISD::FSUB,
@@ -484,6 +481,8 @@ RISCVTargetLowering::RISCVTargetLowering(const TargetMachine &TM,
setOperationAction({ISD::SINT_TO_FP, ISD::UINT_TO_FP}, XLenVT, Custom);
}
+ setOperationAction(ISD::BITCAST, MVT::i16, Custom);
+
setOperationAction(ISD::STRICT_FP_ROUND, MVT::f16, Legal);
setOperationAction(ISD::STRICT_FP_EXTEND, MVT::f32, Legal);
setCondCodeAction(FPCCToExpand, MVT::f16, Expand);
More information about the llvm-commits
mailing list