This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Fix PR23603.
ClosedPublic

Authored by sanjoy on May 27 2015, 3:16 PM.

Details

Summary

LLVM's MI level notion of invariant_load is different from LLVM's IR
level notion of invariant_load with respect to dereferenceability. The
IR notion of invariant_load only guarantees that all *non-faulting*
invariant loads result in the same value. The MI notion of invariant
load guarantees that the load can be legally moved to any location
within its containing function. The MI notion of invariant_load is
stronger than the IR notion of invariant_load -- an MI invariant_load is
an IR invariant_load + a guarantee that the location being loaded from
is dereferenceable throughout the function's lifetime.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 26640.May 27 2015, 3:16 PM
sanjoy retitled this revision from to [SelectionDAG] Fix PR23603..
sanjoy updated this object.
sanjoy edited the test plan for this revision. (Show Details)
sanjoy added reviewers: hfinkel, reames.
sanjoy added a subscriber: Unknown Object (MLST).
hfinkel accepted this revision.Jun 1 2015, 6:09 AM
hfinkel edited edge metadata.

LGTM.

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
2851 ↗(On Diff #26640)

Please add a comment here explaining why the dereferenceability check is needed.

This revision is now accepted and ready to land.Jun 1 2015, 6:09 AM
This revision was automatically updated to reflect the committed changes.