This is an archive of the discontinued LLVM Phabricator instance.

Fix some cases where the index size was used instead of the pointer size
AbandonedPublic

Authored by nhaehnle on Oct 11 2018, 12:28 PM.

Details

Summary

r325102 introduced the split between pointer size (number of bytes / bits
of a pointer) and index size (number of bytes / bits that are canonically
used for GEP index operands).

This patch fixes a bunch of locations around ValueTracking where the
index size was incorrectly used for pointer types.

There are no new or fixed test cases. This patch simply fixes a
conceptual error that I noticed while working on ValueTracking for
pointers (for which I will submit a separate patch).

Change-Id: Ic63c2db644b53dc036ea2d1f037dafea4ad10b02

Diff Detail

Event Timeline

nhaehnle created this revision.Oct 11 2018, 12:28 PM

Add a test, please.

I explained why there's no test. The following commit (linked in the stack) has a test case which crashes without this change.

I explained why there's no test. The following commit (linked in the stack) has a test case which crashes without this change.

You've dropped the following commit.

nhaehnle abandoned this revision.Feb 7 2019, 3:16 AM

I still find the code as-is a bit dubious, but we no longer need this change and the review process tends to be a bit of a pain, so I'm dropping this.

Herald added a project: Restricted Project. · View Herald TranscriptFeb 7 2019, 3:16 AM