diff options
author | Vedant Kumar <vsk@apple.com> | 2015-09-23 15:49:08 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2015-09-23 15:49:08 +0000 |
commit | ff08e926ba8dee4111adf7f7df72905de7a610ea (patch) | |
tree | dea4c4844638190012d04ccc54ff77771200aa84 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | aab93b59d4192b9e300489a3bfabccffd0969dfa (diff) | |
download | llvm-ff08e926ba8dee4111adf7f7df72905de7a610ea.zip llvm-ff08e926ba8dee4111adf7f7df72905de7a610ea.tar.gz llvm-ff08e926ba8dee4111adf7f7df72905de7a610ea.tar.bz2 |
[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/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 638dfde..15cb26f 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; |