[llvm] SimplifyLibCalls: Emit vector ldexp intrinsics in exp2->ldexp combine (PR #92219)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 00:01:34 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 d7bb0723fe79d2b75d41789d2ffadda3567dd94e accf6369d78dbf04666359db174974b7abb11ccf -- llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
index ec8c9073a3..21ec07ae02 100644
--- a/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
@@ -2000,8 +2000,7 @@ static Value *getIntToFPVal(Value *I2F, IRBuilderBase &B, unsigned DstWidth) {
     Value *Op = cast<Instruction>(I2F)->getOperand(0);
     // Make sure that the exponent fits inside an "int" of size DstWidth,
     // thus avoiding any range issues that FP has not.
-    unsigned BitWidth =
-        Op->getType()->getScalarSizeInBits();
+    unsigned BitWidth = Op->getType()->getScalarSizeInBits();
     if (BitWidth < DstWidth || (BitWidth == DstWidth && isa<SIToFPInst>(I2F))) {
       Type *IntTy = Op->getType()->getWithNewBitWidth(DstWidth);
       return isa<SIToFPInst>(I2F) ? B.CreateSExt(Op, IntTy)

``````````

</details>


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


More information about the llvm-commits mailing list