[Inline] Use AssumptionCache from the right Function
[oota-llvm.git] / lib / Transforms / Utils / InlineFunction.cpp
index 638dfde7903e63144ca525a01af891ea06d2b5bd..15cb26fbbd67af7ed7761371bfbeaf1ebaff8899 100644 (file)
@@ -741,7 +741,7 @@ static void AddAlignmentAssumptions(CallSite CS, InlineFunctionInfo &IFI) {
       // caller, then don't bother inserting the assumption.
       Value *Arg = CS.getArgument(I->getArgNo());
       if (getKnownAlignment(Arg, DL, CS.getInstruction(),
-                            &IFI.ACT->getAssumptionCache(*CalledFunc),
+                            &IFI.ACT->getAssumptionCache(*CS.getCaller()),
                             &DT) >= Align)
         continue;