[PATCH] D129167: [AggressiveInstCombine] convert sqrt libcalls with "nnan" to sqrt intrinsics

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 10:04:39 PDT 2022


efriedma added inline comments.


================
Comment at: llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp:445
+  if (!CalledFunc->getParent() || !TLI.getLibFunc(*CalledFunc, Func) ||
+      !isLibFuncEmittable(M, &TLI, Func))
+    return false;
----------------
Checking that `CalledFunc->getParent()` doesn't make sense; the module is never going to be null.  Did you mean `!CalledFunc`?

Can we use the getLibFunc() overload that takes a CallBase as an argument?


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

https://reviews.llvm.org/D129167



More information about the llvm-commits mailing list