[PATCH] D28453: SimplifyLibCalls: Remove checks for fabs

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 7 20:35:41 PST 2017


davide added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:1100-1103
+    Module *M = Callee->getParent();
+    Function *FabsF = Intrinsic::getDeclaration(M, Intrinsic::fabs,
+                                                CI->getType());
+    Value *FAbs = B.CreateCall(FabsF, Sqrt);
----------------
You can fold `Callee->getParent()` as the first argument of `getDeclaration` because it has only one use, no?


https://reviews.llvm.org/D28453





More information about the llvm-commits mailing list