Commit a8477b0
arcv: do not emit 64-bit MAC pairs for 32-bit data
Currently on ARC-V, the maddhisi3 pattern always expands to the
madd_split_fused instruction regardless of the target word size, which
leads to the full-width mul and add instructions being emitted for
32-bit data even on riscv64:
mul a6,a4,s6
add a6,a6,s7
sext.w s7,a6
To fix this, add another define_insn (madd_split_fused_extended) pattern
wrapping the result of a MAC operation into a sign-extension from 32 to
64 bits, and use it in the (u)maddhisi3 expander in case of a 64-bit
target. The assembly code after this change is more efficient, viz.:
mulw a6,a4,s6
addw a6,a6,s7
Signed-off-by: Artemiy Volkov <artemiy@synopsys.com>1 parent 12c7874 commit a8477b0
1 file changed
+53
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4510 | 4510 | | |
4511 | 4511 | | |
4512 | 4512 | | |
4513 | | - | |
| 4513 | + | |
| 4514 | + | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
| 4518 | + | |
| 4519 | + | |
| 4520 | + | |
| 4521 | + | |
| 4522 | + | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
| 4527 | + | |
4514 | 4528 | | |
4515 | 4529 | | |
4516 | 4530 | | |
| |||
4528 | 4542 | | |
4529 | 4543 | | |
4530 | 4544 | | |
4531 | | - | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
| 4557 | + | |
| 4558 | + | |
| 4559 | + | |
4532 | 4560 | | |
4533 | 4561 | | |
4534 | 4562 | | |
| |||
4564 | 4592 | | |
4565 | 4593 | | |
4566 | 4594 | | |
| 4595 | + | |
| 4596 | + | |
| 4597 | + | |
| 4598 | + | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
| 4602 | + | |
| 4603 | + | |
| 4604 | + | |
| 4605 | + | |
| 4606 | + | |
| 4607 | + | |
| 4608 | + | |
| 4609 | + | |
| 4610 | + | |
| 4611 | + | |
| 4612 | + | |
| 4613 | + | |
| 4614 | + | |
| 4615 | + | |
| 4616 | + | |
| 4617 | + | |
4567 | 4618 | | |
4568 | 4619 | | |
4569 | 4620 | | |
| |||
0 commit comments