Commit 3611c0b
authored
[AMDGPU] SIWholeQuadMode: avoid execz effects in exact regions (#101157)
Exact mode regions within WQM may have EXEC=0 in divergent control flow.
This occurs if a branch is only taken by helper lanes and an instruction
requiring WQM disabling is encountered.
The current code extends the exact region as far as possible; however,
this can result in it including instructions with unwanted side effects
at EXEC=0.
In particular readfirstlane combined with scalar loads can produce
invalid memory accesses in this circumstance.
Workaround this by shrinking exact regions to only the instructions
requiring WQM disabling when unwanted side effects are present.
Eventually we should branch over these regions when EXEC=0, but this
requires visibility of CFG/divergence information not currently
available.1 parent 65c000a commit 3611c0b
File tree
2 files changed
+29
-13
lines changed- llvm
- lib/Target/AMDGPU
- test/CodeGen/AMDGPU
2 files changed
+29
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
1367 | 1385 | | |
1368 | | - | |
| 1386 | + | |
1369 | 1387 | | |
1370 | 1388 | | |
1371 | 1389 | | |
| |||
1385 | 1403 | | |
1386 | 1404 | | |
1387 | 1405 | | |
1388 | | - | |
1389 | 1406 | | |
1390 | | - | |
| 1407 | + | |
1391 | 1408 | | |
1392 | 1409 | | |
1393 | 1410 | | |
1394 | 1411 | | |
1395 | 1412 | | |
1396 | 1413 | | |
1397 | 1414 | | |
1398 | | - | |
1399 | | - | |
| 1415 | + | |
1400 | 1416 | | |
1401 | 1417 | | |
1402 | 1418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3551 | 3551 | | |
3552 | 3552 | | |
3553 | 3553 | | |
3554 | | - | |
3555 | 3554 | | |
3556 | 3555 | | |
3557 | | - | |
3558 | | - | |
| 3556 | + | |
| 3557 | + | |
3559 | 3558 | | |
3560 | | - | |
| 3559 | + | |
| 3560 | + | |
3561 | 3561 | | |
3562 | 3562 | | |
3563 | 3563 | | |
| |||
3581 | 3581 | | |
3582 | 3582 | | |
3583 | 3583 | | |
3584 | | - | |
3585 | 3584 | | |
3586 | 3585 | | |
3587 | | - | |
3588 | | - | |
| 3586 | + | |
| 3587 | + | |
3589 | 3588 | | |
3590 | | - | |
| 3589 | + | |
| 3590 | + | |
3591 | 3591 | | |
3592 | 3592 | | |
3593 | 3593 | | |
| |||
0 commit comments