[llvm] [Reassociate] Resolve FIXME: No Lowering of FNeg to FMul unless it is safe (PR #85252)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 14 10:50:19 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 92a09c0165b87032e1bd05020a78ed845cf35661 85edaf4b702e06240477db9c17ae181474288cde -- llvm/lib/Transforms/Scalar/Reassociate.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 8e68d8cbe6..971cf88c33 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -291,8 +291,7 @@ static BinaryOperator *LowerNegateToMultiply(Instruction *Neg) {
Type *Ty = Neg->getType();
// Only lower to FMul if the operation is not a unary FNeg or Neg has the
// correct flags.
- if (Ty->isFPOrFPVectorTy() && isa<UnaryOperator>(Neg) &&
- !Neg->hasNoNaNs())
+ if (Ty->isFPOrFPVectorTy() && isa<UnaryOperator>(Neg) && !Neg->hasNoNaNs())
return nullptr;
Constant *NegOne = Ty->isIntOrIntVectorTy() ? ConstantInt::getAllOnesValue(Ty)
``````````
</details>
https://github.com/llvm/llvm-project/pull/85252
More information about the llvm-commits
mailing list