[PATCH] D28453: SimplifyLibCalls: Remove checks for fabs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 7 20:37:28 PST 2017


arsenm 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);
----------------
davide wrote:
> You can fold `Callee->getParent()` as the first argument of `getDeclaration` because it has only one use, no?
I usually prefer always using variables to avoid uglier line wraps


https://reviews.llvm.org/D28453





More information about the llvm-commits mailing list