[PATCH] D154496: InstCombine: Fold ldexp(ldexp(x, a), b) -> ldexp(x, a + b)
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 5 05:32:33 PDT 2023
foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2381-2383
+ // It's also safe to fold if we know both exponents have the same sign since
+ // it would just double down on the overflow/underflow which would occur
+ // anyway.
----------------
Additionally it would be safe if both exponents are known to be <= 0, but I guess we don't have a helper function for that.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154496/new/
https://reviews.llvm.org/D154496
More information about the llvm-commits
mailing list