getParent() ^ 3 == getModule() ; NFCI
[oota-llvm.git] / lib / CodeGen / CodeGenPrepare.cpp
index 30af1c54fac93683703490286faddb6d0b153e2e..3b721417ed54d3e966f488d56386898c72dff34d 100644 (file)
@@ -830,7 +830,7 @@ static bool CombineUAddWithOverflow(CmpInst *CI) {
     assert(*AddI->user_begin() == CI && "expected!");
 #endif
 
-  Module *M = CI->getParent()->getParent()->getParent();
+  Module *M = CI->getModule();
   Value *F = Intrinsic::getDeclaration(M, Intrinsic::uadd_with_overflow, Ty);
 
   auto *InsertPt = AddI->hasOneUse() ? CI : AddI;