[PATCH] D63038: [SimplifyLibCalls] powf(x, sitofp(n)) -> powi(x, n)

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 15:21:17 PDT 2019


xbolva00 marked an inline comment as done.
xbolva00 added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1454
+    return createPowWithIntegerExponent(
+        Base, cast<Instruction>(Expo)->getOperand(0), M, B);
+
----------------
efriedma wrote:
> xbolva00 wrote:
> > efriedma wrote:
> > > I think you're missing some checks here.
> > I think isFast (-Ofast) check is good enough for now.
> > 
> > I wrote some tests with various bases, https://pastebin.com/xpysEY0f.
> > I got same output for pow and powi.
> This code doesn't even run in those cases?
> 
> I'm specifically concerned about cases where the exponent isn't an int32_t... if it's wider, or unsigned.
You are right, we need to check it. 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63038/new/

https://reviews.llvm.org/D63038





More information about the llvm-commits mailing list