[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
Fri Aug 11 13:55:09 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp:2573
+
+ if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(FNegOp)) {
+ // Make sure to preserve flags and metadata on the call.
----------------
goldstein.w.n wrote:
> Doesn't exponent need to by odd for this? I.e
>
> -(X ^ 2) != ((-X) ^ 2).
It’s not a square, it’s X * 2^N
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156579/new/
https://reviews.llvm.org/D156579
More information about the llvm-commits
mailing list