This is an archive of the discontinued LLVM Phabricator instance.

[SROA] Fix APInt size when alloca address space is not 0
ClosedPublic

Authored by yaxunl on Jun 12 2017, 7:52 AM.

Details

Summary

SROA assumes alloca address space is 0, which causes assertion. This patch fixes that.

Diff Detail

Repository
rL LLVM

Event Timeline

yaxunl created this revision.Jun 12 2017, 7:52 AM
arsenm edited edge metadata.Jun 12 2017, 8:15 AM

You can add the test to test/SROA/alloca-address-space.ll

yaxunl updated this revision to Diff 102194.Jun 12 2017, 9:39 AM

remove test non-zero-alloca-addr-space.ll and add test to address-spaces.ll

arsenm added inline comments.Jun 20 2017, 12:04 PM
test/Transforms/SROA/address-spaces.ll
2 ↗(On Diff #102194)

I think this test should be left as is. Versions of this test with the non-0 alloca addrspace belong in a separate test file

2 ↗(On Diff #102194)

I meant to merge it with the test that already changes the address space alloca, not this one

yaxunl updated this revision to Diff 104210.Jun 27 2017, 10:34 AM
yaxunl marked 2 inline comments as done.

move the test to another one.

arsenm accepted this revision.Jun 27 2017, 10:42 AM

LGTM

This revision is now accepted and ready to land.Jun 27 2017, 10:42 AM
This revision was automatically updated to reflect the committed changes.