[llvm] [SelectionDAG] Lower llvm.ldexp.f32 to ldexp() on Windows. (PR #95301)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 19:32:58 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 5ae5774fb0b5cac11af479b0905dfdd5255b4047 79193063c2a86a972326edfbada184c7a208cfc0 -- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp llvm/lib/Target/ARM/ARMISelLowering.cpp llvm/lib/Target/X86/X86ISelLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 41008c6846..c2631b22b0 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -1781,18 +1781,14 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
// On MSVC, both 32-bit and 64-bit, ldexpf(f32) is not defined. MinGW has
// it, but it's just a wrapper around ldexp.
if (Subtarget->isTargetWindows()) {
- for (ISD::NodeType Op :
- {ISD::FLDEXP, ISD::STRICT_FLDEXP,
- ISD::FFREXP})
+ for (ISD::NodeType Op : {ISD::FLDEXP, ISD::STRICT_FLDEXP, ISD::FFREXP})
if (isOperationExpand(Op, MVT::f32))
setOperationAction(Op, MVT::f32, Promote);
}
// LegalizeDAG currently can't expand fp16 LDEXP/FREXP on targets where i16
// isn't legal.
- for (ISD::NodeType Op :
- {ISD::FLDEXP, ISD::STRICT_FLDEXP,
- ISD::FFREXP})
+ for (ISD::NodeType Op : {ISD::FLDEXP, ISD::STRICT_FLDEXP, ISD::FFREXP})
if (isOperationExpand(Op, MVT::f16))
setOperationAction(Op, MVT::f16, Promote);
diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp
index f53bee8d57..2b7c58c930 100644
--- a/llvm/lib/Target/ARM/ARMISelLowering.cpp
+++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp
@@ -1581,18 +1581,14 @@ ARMTargetLowering::ARMTargetLowering(const TargetMachine &TM,
// On MSVC, both 32-bit and 64-bit, ldexpf(f32) is not defined. MinGW has
// it, but it's just a wrapper around ldexp.
if (Subtarget->isTargetWindows()) {
- for (ISD::NodeType Op :
- {ISD::FLDEXP, ISD::STRICT_FLDEXP,
- ISD::FFREXP})
+ for (ISD::NodeType Op : {ISD::FLDEXP, ISD::STRICT_FLDEXP, ISD::FFREXP})
if (isOperationExpand(Op, MVT::f32))
setOperationAction(Op, MVT::f32, Promote);
}
// LegalizeDAG currently can't expand fp16 LDEXP/FREXP on targets where i16
// isn't legal.
- for (ISD::NodeType Op :
- {ISD::FLDEXP, ISD::STRICT_FLDEXP,
- ISD::FFREXP})
+ for (ISD::NodeType Op : {ISD::FLDEXP, ISD::STRICT_FLDEXP, ISD::FFREXP})
if (isOperationExpand(Op, MVT::f16))
setOperationAction(Op, MVT::f16, Promote);
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 3ced6f5939..4982be5d68 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -2489,9 +2489,7 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
// On MSVC, both 32-bit and 64-bit, ldexpf(f32) is not defined. MinGW has
// it, but it's just a wrapper around ldexp.
if (Subtarget.isOSWindows()) {
- for (ISD::NodeType Op :
- {ISD::FLDEXP, ISD::STRICT_FLDEXP,
- ISD::FFREXP})
+ for (ISD::NodeType Op : {ISD::FLDEXP, ISD::STRICT_FLDEXP, ISD::FFREXP})
if (isOperationExpand(Op, MVT::f32))
setOperationAction(Op, MVT::f32, Promote);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/95301
More information about the llvm-commits
mailing list