This is an archive of the discontinued LLVM Phabricator instance.

IR: Fold away compares between GV GEPs and GVs
ClosedPublic

Authored by majnemer on Jun 20 2014, 5:31 PM.

Details

Summary

A GEP of a non-weak global variable will not be equivalent to another
non-weak global variable or a GEP of such a variable.

Diff Detail

Event Timeline

majnemer updated this revision to Diff 10712.Jun 20 2014, 5:31 PM
majnemer retitled this revision from to IR: Fold away compares between GV GEPs and GVs.
majnemer updated this object.
majnemer added a reviewer: nlewycky.
majnemer added a subscriber: Unknown Object (MLST).
nlewycky accepted this revision.Jul 4 2014, 11:53 AM
nlewycky edited edge metadata.
nlewycky added inline comments.
lib/IR/ConstantFold.cpp
1339

(No action required:) I realize this is copied from elsewhere, but I don't see why we can't follow non-weak aliases as long as they point to definitions.

1538

// Don't know relative ordering, but check for inequality.

This revision is now accepted and ready to land.Jul 4 2014, 11:53 AM
majnemer closed this revision.Jul 4 2014, 3:13 PM
majnemer updated this revision to Diff 11095.

Closed by commit rL212360 (authored by @majnemer).