[PATCH] D156579: InstCombine: Fold fneg (ldexp x, n) -> ldexp (fneg x), n
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 11 13:38:41 PDT 2023
goldstein.w.n 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.
----------------
Doesn't exponent need to by odd for this? I.e
-(X ^ 2) != ((-X) ^ 2).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156579/new/
https://reviews.llvm.org/D156579
More information about the llvm-commits
mailing list