This is an archive of the discontinued LLVM Phabricator instance.

[Inline] Use AssumptionCache from the right Function
ClosedPublic

Authored by vsk on Sep 19 2015, 3:48 PM.

Details

Summary

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!

Diff Detail

Repository
rL LLVM

Event Timeline

vsk updated this revision to Diff 35186.Sep 19 2015, 3:48 PM
vsk updated this revision to Diff 35187.
vsk retitled this revision from to [Inline] Use AssumptionCache from the right Function.
vsk updated this object.
vsk added reviewers: hfinkel, mehdi_amini.
vsk updated this object.
vsk added a subscriber: llvm-commits.
  • Fix CHECK line typo.
mehdi_amini added inline comments.Sep 19 2015, 3:52 PM
test/Transforms/Inline/inline-assume.ll
12 ↗(On Diff #35187)

You don't really check that bar was indeed inlined, because this would match the content of bar.
I think there should be *after* that a CHECK-LABEL for bar()

vsk updated this revision to Diff 35188.Sep 19 2015, 6:43 PM
  • Check whether @bar is actually inlined.
hfinkel accepted this revision.Sep 23 2015, 1:52 AM
hfinkel edited edge metadata.

This is the same fix as D12957, and also LGTM.

This revision is now accepted and ready to land.Sep 23 2015, 1:52 AM
This revision was automatically updated to reflect the committed changes.