Commit 2973feb
authored
[AMDGPU] Force the third source operand of the MAI instructions to VGPR if no AGPRs are used. (#69720)
eaf85b9c28 "[AMDGPU] Select VGPR versions of MFMA if possible" prevents
the compiler from reserving AGPRs if a kernel has no inline asm
explicitly using AGPRs, no calls, and runs at least 2 waves with not
more than 256 VGPRs. This, in turn, makes it impossible to allocate AGPR
if necessary. As a result, regalloc fails in case we have an MAI
instruction that has at least one AGPR operand.
This change checks if we have AGPRs and forces operands to VGPR if we do
not have them.
---------
Co-authored-by: Alexander Timofeev <alexander.timofeev@amd.com>1 parent 25da9bb commit 2973feb
File tree
2 files changed
+66
-3
lines changed- llvm
- lib/Target/AMDGPU
- test/CodeGen/AMDGPU
2 files changed
+66
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14136 | 14136 | | |
14137 | 14137 | | |
14138 | 14138 | | |
14139 | | - | |
| 14139 | + | |
| 14140 | + | |
| 14141 | + | |
14140 | 14142 | | |
14141 | 14143 | | |
14142 | 14144 | | |
| |||
14147 | 14149 | | |
14148 | 14150 | | |
14149 | 14151 | | |
| 14152 | + | |
14150 | 14153 | | |
14151 | | - | |
14152 | | - | |
| 14154 | + | |
| 14155 | + | |
| 14156 | + | |
| 14157 | + | |
14153 | 14158 | | |
14154 | 14159 | | |
| 14160 | + | |
| 14161 | + | |
14155 | 14162 | | |
14156 | 14163 | | |
14157 | 14164 | | |
| |||
14169 | 14176 | | |
14170 | 14177 | | |
14171 | 14178 | | |
| 14179 | + | |
| 14180 | + | |
| 14181 | + | |
14172 | 14182 | | |
14173 | 14183 | | |
14174 | 14184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments