[llvm-branch-commits] [llvm] InstCombine: Handle rounding intrinsics in SimplifyDemandedFPClass (PR #174842)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 8 10:05:36 PST 2026


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 origin/main HEAD --extensions h,cpp -- llvm/include/llvm/Support/KnownFPClass.h llvm/lib/Analysis/ValueTracking.cpp llvm/lib/Support/KnownFPClass.cpp llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index 86c086e16..61731aac1 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -2567,8 +2567,9 @@ Value *InstCombinerImpl::SimplifyDemandedUseFPClass(Instruction *I,
       if (IID == Intrinsic::ceil && KnownSrc.isKnownAlways(fcPosSubnormal))
         return ConstantFP::get(VTy, 1.0);
 
-      Known = KnownFPClass::roundToIntegral(KnownSrc, IID == Intrinsic::trunc,
-                                            VTy->getScalarType()->isMultiUnitFPType());
+      Known = KnownFPClass::roundToIntegral(
+          KnownSrc, IID == Intrinsic::trunc,
+          VTy->getScalarType()->isMultiUnitFPType());
 
       FPClassTest ValidResults = DemandedMask & Known.KnownFPClasses;
       if (Constant *SingleVal =

``````````

</details>


https://github.com/llvm/llvm-project/pull/174842


More information about the llvm-branch-commits mailing list