Commit aea773c
committed
[AMDGPU] Allow casts between the Global and Constant Addr Spaces in isValidAddrSpaceCast
So far, isValidAddrSpaceCast only allows casts to the flat address space and
between the constant(32) address spaces. It does not allow casting between the
global and constant address spaces, even though the constant AS is only an
alias for the global AS. That affects, e.g., the lowering of memmoves from the
constant to the global address space in LowerMemIntrinsics, since that requires
aliasing address spaces to be castable.
This patch allows such casts. It also includes a memmove test that would crash
with the previous implementation because the memmove IR lowering would not be
applicable for the move from constant AS to global AS.1 parent 37ad65f commit aea773c
File tree
2 files changed
+2339
-3
lines changed- llvm
- lib/Target/AMDGPU
- test/CodeGen/AMDGPU
2 files changed
+2339
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
193 | 196 | | |
194 | 197 | | |
195 | 198 | | |
| |||
0 commit comments