[AggressiveInstCombine] Fix cases where non-opaque pointers are used
authorDavid Stuttard <david.stuttard@amd.com>
Mon, 3 Oct 2022 18:21:18 +0000 (19:21 +0100)
committerDavid Stuttard <david.stuttard@amd.com>
Wed, 5 Oct 2022 12:42:46 +0000 (13:42 +0100)
commitd1d7d2235ced0a959bf0d2513f8adc50c0e5efd8
tree8f01247e6afa914880fbd85fb732b3f1c4ca5a0e
parentd14a0292220e158dd55d670fd007c08e771c294e
[AggressiveInstCombine] Fix cases where non-opaque pointers are used

In the case of non-opaque pointers, when combining consecutive loads,
need to bitcast the pointer source to the combined type size, otherwise
asserts are triggered.

Differential Revision: https://reviews.llvm.org/D135249
llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp