This is an archive of the discontinued LLVM Phabricator instance.

llvm.noalias - don't look through it to simplify GEPs
AcceptedPublic

Authored by hfinkel on Jul 8 2016, 6:30 PM.

Details

Summary

This is an important case where we shouldn't look through llvm.noalias intrinsics when stripping pointer casts; when simplifying GEPs in InstCombine. If we did, then we always end up replacing the GEP pointer argument with the (simplified) pointer argument of the llvm.noalias intrinsic. Doing that destroys the information that the noalias intrinsic is providing about the pointer value.

Diff Detail

Event Timeline

hfinkel updated this revision to Diff 63368.Jul 8 2016, 6:30 PM
hfinkel retitled this revision from to llvm.noalias - don't look through it to simplify GEPs.
hfinkel updated this object.
hfinkel added reviewers: chandlerc, dberlin.
hfinkel added a subscriber: llvm-commits.
majnemer accepted this revision.Jul 10 2016, 1:11 AM
majnemer added a reviewer: majnemer.
majnemer added a subscriber: majnemer.

LGTM, seems reasonable. I wonder if we should have a transform which removes redundant aliasing intrinsics...

This revision is now accepted and ready to land.Jul 10 2016, 1:11 AM
hfinkel updated this revision to Diff 73368.Oct 3 2016, 4:09 PM
hfinkel edited edge metadata.

Rebased.