Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/AMDGPU/merge-sbuffer-load.mir | ||
---|---|---|
136 | Add couple negative tests maybe, one with different sgprs used and one with non-adjacent offsets? |
I can't resist pointing out that this patch would be simpler if we never used the _SGPR form on subtargets where the _SGPR_IMM form is available.
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | ||
---|---|---|
644 | Don't you need to list the _SGPR forms here too? |
It would be even simpler if we did this in the IR to begin with. It's only after codegen you have to worry so much about addressing mode minutia
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | ||
---|---|---|
644 | Oh, that's a nice catch, thanks. I've updated hasSameBaseAddress() above to compare the number of address operands so tests could catch this as well. |
True, the implementation would be a bit simpler. I don't mind it either way, it's just that a slightly simpler implementation doesn't necessarily work as an obviously sufficient argument when it comes to user-faced things. I guess some wider discussion might help here.
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp | ||
---|---|---|
1388 | Also changed this line to what looks to me a more reliable implementation. |
Don't you need to list the _SGPR forms here too?