Don't promote alloca to vector for atomic load/store
Details
Diff Detail
Event Timeline
test/CodeGen/AMDGPU/vector-alloca-atomic.ll | ||
---|---|---|
3 | If I remove the line "target datalayout = "A5"", I will get the following errors: chfang@shanghai:~/bug/llvm/build/bin$ ./opt -S -mtriple=amdgcn---amdgiz -amdgpu-promote-alloca -sroa -instcombine < ../../test/CodeGen/AMDGPU/vector-alloca-atomic.ll | ./FileCheck -check-prefix=OPT ../../test/CodeGen/AMDGPU/vector-alloca-atomic.ll %alloca = alloca [3 x i32], addrspace(5) Allocation instruction pointer not in the stack address space! %alloca = alloca [3 x i32], addrspace(5) Allocation instruction pointer not in the stack address space! %alloca = alloca [3 x i32], addrspace(5) ./opt: -: error: input module is broken! |
What do you think of the test?
What should we do if we don't add the following line?
target datalayout = "A5"
Thanks;
Update the test:
- Remove the -amdgiz from the triple since it is no longer necessary;
- Add "-data-layout=A5" to explicitly specify the data layout for address space 5 for alloca
- and to remove the "target:" line for the same data layout purpose.
You can use isSimple which checks volatile and atomic