[Inline] Use AssumptionCache from the right Function
authorVedant Kumar <vsk@apple.com>
Wed, 23 Sep 2015 15:49:08 +0000 (15:49 +0000)
committerVedant Kumar <vsk@apple.com>
Wed, 23 Sep 2015 15:49:08 +0000 (15:49 +0000)
commitd03868bb86e3091612f81d4123dc00970f9f8286
treee7981ab4e54c03e77801952e51aacfcdf2c343a3
parentb2d0e28941e735f912d9e45a6ccc8c852d2647ae
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248390 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/Inline/inline-assume.ll [new file with mode: 0644]