Page MenuHomePhabricator

Remove handling of AddrSpaceCast in stripAndAccumulateInBoundsConstantOffsets
ClosedPublic

Authored by simoncook on Sep 21 2015, 3:30 AM.

Details

Summary

Unlike BitCasts, AddrSpaceCasts do not always produce an output the same size as its input, which was previously assumed. This fixes cases where two address spaces do not have the same size pointer, as an assertion failure would occur in LoopSimplify when an the output of an AddrSpaceCast is used as an input operand for a GEP as the base pointer would be of a different size to an offset.

Event Timeline

simoncook updated this revision to Diff 35221.Sep 21 2015, 3:30 AM
simoncook retitled this revision from to Remove handling of AddrSpaceCast in stripAndAccumulateInBoundsConstantOffsets.
simoncook updated this object.
simoncook added a subscriber: llvm-commits.
reames accepted this revision.Sep 21 2015, 3:27 PM
reames added a reviewer: reames.
reames added a subscriber: reames.

LGTM w/minor comment addressed.

test/Transforms/LoopUnswitch/2015-09-18-Addrspace.ll
3 ↗(On Diff #35350)

A comment about what this is testing a FileCheck directive or two would be good.

This revision is now accepted and ready to land.Sep 21 2015, 3:27 PM
simoncook updated this revision to Diff 35350.Sep 22 2015, 1:28 AM
simoncook edited edge metadata.

Added comment to test as per recommendation.

As I do not yet have commit access, could someone commit this on my behalf?

This revision was automatically updated to reflect the committed changes.