[PATCH] D128591: Transforms: refactor pow(x, n) expansion where n is a constant integer value

eaeltsin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 06:08:46 PDT 2022


eaeltsin added a comment.

Hi David,

One more question - my concern is that we get different results in logically equal contexts:

  // FAIL
  TEST(Test, Pow7) {
    double x1 = 8.804009981602594;
    double x2 = init("\x0a\x48\x41\x32\xa7\x9b\x21\x40");  // 8.804009981602594
    double y = 10.0;
    double t = std::pow(x1, y);
    double z = std::pow(x2, y);
    EXPECT_TRUE(t - z < 1e-6 && z - t < 1e-6);
  }

It looks like only the newly inlined version differs, while compile-time and library versions agree.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128591



More information about the llvm-commits mailing list