32-bit constant address space is declared as 6, so the
maximum number of address spaces is 6, not 5.
Fixes "LLVM ERROR: Pointer address space out of range".
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106630
Differential D47261
AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space hakzsam on May 23 2018, 7:54 AM. Authored by
Details 32-bit constant address space is declared as 6, so the Fixes "LLVM ERROR: Pointer address space out of range". Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106630
Diff Detail Event TimelineComment Actions Sure., but can you give me more details about what you want? Is there already an example that I could start from? Comment Actions Needs a test, preferably the full set of AA checks with 32 bit constant Unfortunately it looks like the commit that added this didn't actually add a proper test for this although I thought there was one that would be easy to add to. I would like there to be a test that purely tests the results of alias queries, like those found in test/Analysis/BasicAA or test/Analysis/ScopedNoAliasAA/basic.ll Comment Actions Given that @yaxunl has done the changes so there is now only one address space mapping, this code can be simplified (and corresponding declarations in AMDGPU.h) to remove support for dynamic address space mappings. So if etsts were to be added would likely be easier to do that for the simplified code? Comment Actions v2: add a very simple test for 32-bit addr space Not sure if it's enough for Matt though. Comment Actions Ideally the test should be moved into somewhere in test/Analysis but that can be a separate patch
Comment Actions NACK. This patch is clearly wrong. This has been reported and answered in https://bugs.llvm.org/show_bug.cgi?id=38113 Comment Actions You are right, we can get out of bounds access with that change. I guess the correct fix is to update the rules table? EDIT: This should be fixed with https://reviews.llvm.org/D50974 Comment Actions Both patches (r340171 and r340172) have been reverted with r340202 because it will be easier for a backport. v4:
Comment Actions Please add a reference to llvm bug https://bugs.llvm.org/show_bug.cgi?id=38113
|
Same comment as D50974. R600 does not use CONSTANT_ADDRESS_32BIT so this value should not be called MAX_COMMON_ADDRESS