This is an archive of the discontinued LLVM Phabricator instance.

[InferAddressSpaces] Fix assertion about null pointer
ClosedPublic

Authored by yaxunl on Jul 4 2017, 12:36 PM.

Details

Summary

InferAddressSpaces does not check address space in collectFlatAddressExpressions,
which causes values with non flat address space put into Postorder and causes
assertion in cloneValueWithNewAddressSpace.

This patch fixes assertion in OpenCL 2.0 conformance test generic_address_space
subtest for amdgcn target.

Diff Detail

Repository
rL LLVM

Event Timeline

yaxunl created this revision.Jul 4 2017, 12:36 PM
arsenm accepted this revision.Jul 6 2017, 11:56 AM

LGTM

test/Transforms/InferAddressSpaces/AMDGPU/basic.ll
175 ↗(On Diff #105195)

Can you check the full expression? It's on my todo list to search through icmp operands for constant expressions

This revision is now accepted and ready to land.Jul 6 2017, 11:56 AM
yaxunl marked an inline comment as done.Jul 6 2017, 12:13 PM
yaxunl added inline comments.
test/Transforms/InferAddressSpaces/AMDGPU/basic.ll
175 ↗(On Diff #105195)

will do in commit

This revision was automatically updated to reflect the committed changes.
yaxunl marked an inline comment as done.