This is an archive of the discontinued LLVM Phabricator instance.

Fix a bug w/inbounds invalidation in LFTR
AbandonedPublic

Authored by reames on Jun 5 2019, 5:55 PM.

Details

Reviewers
nikic
Summary

(Mostly for discussion, not yet ready for real review)

This contains fixes for two cases where we might invalidate inbounds and leave it stale in the IR (a miscompile). Case 1 is when switching to an IV with no dynamically live uses, and case 2 is when doing pre-to-post conversion on the same pointer type IV.

Regardless of whether we actually take this approach for the bugs, the move from hasConcreteDef to the programHasUB approach is worthwhile. Several test cases *improve* substantially with only that part.

In fact, the fix for case 1 is minor in terms of test quality, possible a positive. It's case 2 which is seen to have fairly wide impact (as expected). The core question is, do we have a better approach for case 2?

Diff Detail

Event Timeline

reames created this revision.Jun 5 2019, 5:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 5 2019, 5:55 PM
reames planned changes to this revision.Jun 6 2019, 12:04 PM

Blocked on discussion in D62939 and landing thereof.

reames abandoned this revision.Jun 10 2019, 3:44 PM

The issues raised in this and D62939 turned out to be inseparable. Given the meaningful review discussion happened on the other review, I'm abandoning this patch.