[PATCH] D156579: InstCombine: Fold fneg (ldexp x, n) -> ldexp (fneg x), n
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 2 11:42:38 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:2529
+ Builder.CreateFNegFMF(X, &FMFSource), Y, &FMFSource));
+ }
+
----------------
goldstein.w.n wrote:
> style: No branches around single expression if
It covers multiple lines
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:2542
- if (match(FNegOp, m_FDiv(m_Value(X), m_Value(Y))))
- return BinaryOperator::CreateFDivFMF(Builder.CreateFNegFMF(X, &FMFSource),
- Y, &FMFSource);
+ IRBuilder<>::FastMathFlagGuard FMFGuard(Builder);
+ Builder.setFastMathFlags(FMF);
----------------
goldstein.w.n wrote:
> IRBuilder is unused?
It's a flag guard, it only does anything on destruct. The actual builder is the member
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156579/new/
https://reviews.llvm.org/D156579
More information about the llvm-commits
mailing list