getParent() ^ 3 == getModule() ; NFCI
[oota-llvm.git] / lib / Transforms / Utils / SimplifyLibCalls.cpp
index df75ed96893dbf5665fb88e9d4f36e32bdee0dce..81dea6d1b9ae3e7b2382b45c157f9dbe7c5cb4fc 100644 (file)
@@ -995,7 +995,7 @@ Value *LibCallSimplifier::optimizeUnaryDoubleFP(CallInst *CI, IRBuilder<> &B,
 
   // floor((double)floatval) -> (double)floorf(floatval)
   if (Callee->isIntrinsic()) {
-    Module *M = CI->getParent()->getParent()->getParent();
+    Module *M = CI->getModule();
     Intrinsic::ID IID = Callee->getIntrinsicID();
     Function *F = Intrinsic::getDeclaration(M, IID, B.getFloatTy());
     V = B.CreateCall(F, V);