This is an archive of the discontinued LLVM Phabricator instance.

Look through addrspacecasts when turning ptr comparisons into index comparisons.
ClosedPublic

Authored by arsenm on Jan 22 2014, 12:37 PM.

Details

Reviewers
jingyue

Diff Detail

Event Timeline

arsenm updated this revision to Diff 10200.Jun 6 2014, 4:58 PM

Fix after r210375. With the addrspacecast and bitcast split, this now needs to look through 2 levels of casts

jingyue accepted this revision.Jun 6 2014, 6:56 PM
jingyue added a reviewer: jingyue.
jingyue added a subscriber: jingyue.

LGTM

test/Transforms/InstCombine/icmp.ll
3

I would put a comment on what the pointer size is in each address space. This can make your test cases more clear.

This revision is now accepted and ready to land.Jun 6 2014, 6:56 PM
arsenm closed this revision.Jun 9 2014, 12:28 PM

r210488