[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 16:18:14 PDT 2019


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


================
Comment at: test/Transforms/InstCombine/pow_fp_int.ll:90
+; CHECK-LABEL: @pow_uitofp_double_base_fast(
+; CHECK-NEXT:    [[TMP1:%.*]] = call fast double @llvm.powi.f64(double [[BASE:%.*]], i32 [[X:%.*]])
+; CHECK-NEXT:    ret double [[TMP1]]
----------------
efriedma wrote:
> Meant to write a comment on this.  Treating "uitofp" like this means you're converting `pow(.999999999,4000000000)` into `pow(.999999999,-294967296)`.
Ah, right.

Can we still do this atleast for some "unsigned" cases, up to i16 (i31?) ?


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

https://reviews.llvm.org/D63038





More information about the llvm-commits mailing list