Pointers in non-zero address spaces need to be address space casted before appending to the used list.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Is this testable? Was it already tested and the test was asserting in some case? Is it not testable for some reason?
The change in this patch is implicitly tested by all the tests introduced in https://reviews.llvm.org/D99071
asan-module pass will append globals to the used list and for AMDGPU these globals will be in non-zero addrspaces.
In the future - semantic changing patches should be part of commits that test them, not committed separately.
If this change was separable, it should've included separate tests with it - such as an IR test with a global in the used list, by the sounds of it?
It does make sense. Like other Utils, I've created ModuleUtilsTest where I've added tests for appending into UsedList. Please take a look, https://reviews.llvm.org/D101746
Sorry, somehow I missed that the function is not just internal Asan utility.
David, thanks for rising this up.