[llvm] [SelectionDAG] Move EVTToAPFloatSemantics to MVT/EVT (PR #103001)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 21:51:42 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff d4dfeb373e95b09ef86865cb33cae21213488afe 46a9c57794dfb43197995ade0642be6bafb5b54e --extensions cpp,h -- llvm/include/llvm/CodeGen/SelectionDAG.h llvm/include/llvm/CodeGen/ValueTypes.h llvm/include/llvm/CodeGenTypes/MachineValueType.h llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/lib/CodeGen/ValueTypes.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp llvm/lib/Target/AMDGPU/SIISelLowering.cpp llvm/lib/Target/RISCV/RISCVISelLowering.cpp llvm/lib/Target/X86/X86ISelLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/CodeGen/ValueTypes.cpp b/llvm/lib/CodeGen/ValueTypes.cpp
index c74ea5879a..458fdfd59f 100644
--- a/llvm/lib/CodeGen/ValueTypes.cpp
+++ b/llvm/lib/CodeGen/ValueTypes.cpp
@@ -292,14 +292,22 @@ EVT EVT::getEVT(Type *Ty, bool HandleUnknown){
const fltSemantics &MVT::getFltSemantics() const {
switch (getScalarType().SimpleTy) {
- default: llvm_unreachable("Unknown FP format");
- case MVT::f16: return APFloat::IEEEhalf();
- case MVT::bf16: return APFloat::BFloat();
- case MVT::f32: return APFloat::IEEEsingle();
- case MVT::f64: return APFloat::IEEEdouble();
- case MVT::f80: return APFloat::x87DoubleExtended();
- case MVT::f128: return APFloat::IEEEquad();
- case MVT::ppcf128: return APFloat::PPCDoubleDouble();
+ default:
+ llvm_unreachable("Unknown FP format");
+ case MVT::f16:
+ return APFloat::IEEEhalf();
+ case MVT::bf16:
+ return APFloat::BFloat();
+ case MVT::f32:
+ return APFloat::IEEEsingle();
+ case MVT::f64:
+ return APFloat::IEEEdouble();
+ case MVT::f80:
+ return APFloat::x87DoubleExtended();
+ case MVT::f128:
+ return APFloat::IEEEquad();
+ case MVT::ppcf128:
+ return APFloat::PPCDoubleDouble();
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/103001
More information about the llvm-commits
mailing list