[PATCH] D67248: [InstCombine] pow(x, +/- 0.0) -> 1.0

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 17:32:30 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp:1566-1567
+  // pow(x, +/- 0.0) -> 1.0
+  if (match(Expo, m_SpecificFP(0.0)) ||
+      match(Expo, m_SpecificFP(-0.0)))
     return ConstantFP::get(Ty, 1.0);
----------------
You can use m_AnyZeroFP


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67248





More information about the llvm-commits mailing list