Commit 2f9f93f
Automerge: [PowerPC] Add custom lowering for SADD overflow for i32 and i64 (#159255)
This patch improves the codegen for saddo on i32 and i64 in both 32-bit
and 64-bit modes by custom lowering. It implements signed-add overflow
detection using the `(x eqv y) & (sum xor x)`bit-level sequence.File tree
3 files changed
+48
-13
lines changed- llvm
- lib/Target/PowerPC
- test/CodeGen/PowerPC
3 files changed
+48
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
| 214 | + | |
214 | 215 | | |
| 216 | + | |
| 217 | + | |
215 | 218 | | |
216 | 219 | | |
217 | 220 | | |
| |||
12514 | 12517 | | |
12515 | 12518 | | |
12516 | 12519 | | |
| 12520 | + | |
| 12521 | + | |
| 12522 | + | |
| 12523 | + | |
| 12524 | + | |
| 12525 | + | |
| 12526 | + | |
| 12527 | + | |
| 12528 | + | |
| 12529 | + | |
| 12530 | + | |
| 12531 | + | |
| 12532 | + | |
| 12533 | + | |
| 12534 | + | |
| 12535 | + | |
| 12536 | + | |
| 12537 | + | |
| 12538 | + | |
| 12539 | + | |
| 12540 | + | |
| 12541 | + | |
| 12542 | + | |
| 12543 | + | |
| 12544 | + | |
| 12545 | + | |
| 12546 | + | |
| 12547 | + | |
| 12548 | + | |
| 12549 | + | |
| 12550 | + | |
12517 | 12551 | | |
12518 | 12552 | | |
12519 | 12553 | | |
| |||
12565 | 12599 | | |
12566 | 12600 | | |
12567 | 12601 | | |
| 12602 | + | |
| 12603 | + | |
12568 | 12604 | | |
12569 | 12605 | | |
12570 | 12606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| 708 | + | |
708 | 709 | | |
709 | 710 | | |
710 | 711 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| |||
0 commit comments