This fixes a regression caused by r256282.
Details
Diff Detail
Event Timeline
| lib/Target/AMDGPU/AMDGPUInstructions.td | ||
|---|---|---|
| 391 | I think this def should be untouched because it is used to FLAT for real flat address. | |
| lib/Target/AMDGPU/CIInstructions.td | ||
| 265 | Do you think we should use "mubuf_load" here? With FlatForGlobal ON, we actually disabled SelectMUBUF. As a result, we should select FLAT for mubuf here. | |
| lib/Target/AMDGPU/SIInstrInfo.td | ||
| 149 | This def here is a little confusion because it may have side effect for the general case where FlatForGlobal is OFF. | |
| lib/Target/AMDGPU/AMDGPUInstructions.td | ||
|---|---|---|
| 391 | I didn't remove this, I just moved it into SIInstrInfo.td. It's a GCN specific definition, so I think that is a better place for it. | |
| lib/Target/AMDGPU/CIInstructions.td | ||
| 259–262 | Yes. | |
| 265 | flat_load matches an additional address space "FlatAddress". | |
| lib/Target/AMDGPU/SIInstrInfo.td | ||
| 149 | I'm not sure what you mean here. | |
| lib/Target/AMDGPU/AMDGPUInstructions.td | ||
|---|---|---|
| 391 | The relocation is fine. But I can not understand the redefinition of flat_load. | |
| lib/Target/AMDGPU/CIInstructions.td | ||
| 265 | Do you think FlatAddress should be matched here? | |
| lib/Target/AMDGPU/SIInstrInfo.td | ||
| 149 | If isGlobalLoad is true, then flat_load is true. This statement is valid only when FlatForGlobal is set. | |
| lib/Target/AMDGPU/CIInstructions.td | ||
|---|---|---|
| 259–262 | Actually, constant extloads already work. I've added test cases for this. | |
| lib/Target/AMDGPU/AMDGPUInstructions.td | ||
|---|---|---|
| 391 | The new definition will match loads in the global and constant address space. The previous definition only matched loads in the flat ("generic" in OpenCL) address space. | |
| lib/Target/AMDGPU/CIInstructions.td | ||
| 265 | Those patterns are redundant now. I will remove them. | |
| lib/Target/AMDGPU/SIInstrInfo.td | ||
| 149 | These functions only look at the the address space of the load instruction. FlatForGlobal has no effect on them. | |
| lib/Target/AMDGPU/CIInstructions.td | ||
|---|---|---|
| 265 | I looked at this more closely and they actually aren't redundant, because they match flat address space on Kaveri without HSA. | |
| lib/Target/AMDGPU/CIInstructions.td | ||
|---|---|---|
| 265 | what was redundant is here: | |
LGTM
| lib/Target/AMDGPU/SIInstrInfo.td | ||
|---|---|---|
| 140–141 | global should be tested first since it is more common | |
I think this def should be untouched because it is used to FLAT for real flat address.