Commit 71de783
[RISCV] Inserting indirect jumps with X7 for Zicfilp (#170683)
`BranchRelxation` uses `RISCVInstrInfo::insertIndirectBranch` to insert
an indirect branch if the jump target is out of range. Currently it uses
register scavenging to find a free register to use for the indirect
target. If Zicfilp is enabled, we need to use X7 so that the jump will
be treated as a software guarded branch.
Co-authored-by: Yeting Kuo <46629943+yetingk@users.noreply.github.com>1 parent d8ad3c1 commit 71de783
File tree
3 files changed
+1589
-8
lines changed- llvm
- lib/Target/RISCV
- test/CodeGen/RISCV
3 files changed
+1589
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1372 | 1372 | | |
1373 | 1373 | | |
1374 | 1374 | | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
1375 | 1378 | | |
1376 | | - | |
| 1379 | + | |
1377 | 1380 | | |
1378 | 1381 | | |
1379 | 1382 | | |
| |||
1383 | 1386 | | |
1384 | 1387 | | |
1385 | 1388 | | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
1386 | 1392 | | |
1387 | 1393 | | |
1388 | 1394 | | |
| |||
0 commit comments