summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2015-09-23 15:49:08 +0000
committerVedant Kumar <vsk@apple.com>2015-09-23 15:49:08 +0000
commitff08e926ba8dee4111adf7f7df72905de7a610ea (patch)
treedea4c4844638190012d04ccc54ff77771200aa84 /llvm/lib/Transforms/Utils
parentaab93b59d4192b9e300489a3bfabccffd0969dfa (diff)
downloadbcm5719-llvm-ff08e926ba8dee4111adf7f7df72905de7a610ea.tar.gz
bcm5719-llvm-ff08e926ba8dee4111adf7f7df72905de7a610ea.zip
[Inline] Use AssumptionCache from the right Function
This changes the behavior of AddAligntmentAssumptions to match its comment. I.e, prove the asserted alignment in the context of the caller, not the callee. Thanks to Mehdi Amini for seeing the issue here! Also to Artur Pilipenko who also saw a fix for the issue. rdar://22521387 Differential Revision: http://reviews.llvm.org/D12997 llvm-svn: 248390
Diffstat (limited to 'llvm/lib/Transforms/Utils')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 638dfde7903..15cb26fbbd6 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -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;
OpenPOWER on IntegriCloud