Commit e353db9
Kane Wang
[RISCV][GlobalISel] Lower G_ATOMICRMW_SUB via G_ATOMICRMW_ADD
RISCV does not provide a native atomic subtract instruction, so this patch lowers G_ATOMICRMW_SUB by negating the RHS value and performing an atomic add. The legalization rules in RISCVLegalizerInfo are updated accordingly, with libcall fallbacks when StdExtA is not available, and intrinsic legalization is extended to support riscv_masked_atomicrmw_sub.1 parent 19464d9 commit e353db9
File tree
13 files changed
+1771
-695
lines changed- llvm
- lib
- CodeGen/GlobalISel
- Target/RISCV/GISel
- test/CodeGen/RISCV/GlobalISel
- instruction-select
- legalizer
13 files changed
+1771
-695
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4773 | 4773 | | |
4774 | 4774 | | |
4775 | 4775 | | |
| 4776 | + | |
| 4777 | + | |
| 4778 | + | |
| 4779 | + | |
| 4780 | + | |
| 4781 | + | |
| 4782 | + | |
| 4783 | + | |
| 4784 | + | |
4776 | 4785 | | |
4777 | 4786 | | |
4778 | 4787 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
703 | 708 | | |
704 | 709 | | |
705 | 710 | | |
| |||
738 | 743 | | |
739 | 744 | | |
740 | 745 | | |
| 746 | + | |
741 | 747 | | |
742 | 748 | | |
743 | 749 | | |
| |||
0 commit comments