[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
Tue Aug 1 16:43:29 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:2532
- if (match(FNeg, m_OneUse(m_FDiv(m_Value(X), m_Value(Y)))))
+ if (match(FNeg, m_FDiv(m_Value(X), m_Value(Y))))
return BinaryOperator::CreateFDivFMF(Builder.CreateFNegFMF(X, &I), Y, &I);
----------------
goldstein.w.n wrote:
> Seems like 2 changes at once? The change to oneuse checks of `(fneg (fmul/fdiv))` and the new transform. Maybe split?
It's not behaviorally changing, it's just avoiding repeating it 3x
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156579/new/
https://reviews.llvm.org/D156579
More information about the llvm-commits
mailing list