This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: fix updating the alias rules since r340171
AbandonedPublic

Authored by hakzsam on Aug 20 2018, 8:21 AM.

Details

Reviewers
arsenm
Summary
The two rules tables have to be updated because
MAX_COMMON_ADDRESS has been bumped to 6 for handling
32-bit constant address space. Otherwise, we might
have out of bounds access.

Reported by Jan Vesely.

Diff Detail

Event Timeline

hakzsam created this revision.Aug 20 2018, 8:21 AM
jvesely added inline comments.Aug 20 2018, 8:36 AM
lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
72

This does not match the current code. Is this a fixup for https://reviews.llvm.org/D47261?

afaik, MAX_COMMON_ADDRESS refers to address spaces shared between amdgcn and r600. r600 does not use CONST_32_BIT AS so it probably should not be in the table.
That said, bumping the table size does not impact r600, so renaming the MAX_COMMON_ADDRESS bound works as well.

hakzsam added inline comments.Aug 20 2018, 12:24 PM
lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
72

Yes, you have to apply this https://reviews.llvm.org/D50973

I think so for MAX_COMMON_ADDRESS, so only ASAliasRulesGenIsZero should be updated?

arsenm accepted this revision.Aug 20 2018, 12:31 PM

LGTM

This revision is now accepted and ready to land.Aug 20 2018, 12:31 PM