Commit 9ce9c29
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 <[email protected]>1 parent 285dc3d commit 9ce9c29
1 file changed
+53
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4534 | 4534 | | |
4535 | 4535 | | |
4536 | 4536 | | |
4537 | | - | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
| 4542 | + | |
| 4543 | + | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
4538 | 4552 | | |
4539 | 4553 | | |
4540 | 4554 | | |
| |||
4552 | 4566 | | |
4553 | 4567 | | |
4554 | 4568 | | |
4555 | | - | |
| 4569 | + | |
| 4570 | + | |
| 4571 | + | |
| 4572 | + | |
| 4573 | + | |
| 4574 | + | |
| 4575 | + | |
| 4576 | + | |
| 4577 | + | |
| 4578 | + | |
| 4579 | + | |
| 4580 | + | |
| 4581 | + | |
| 4582 | + | |
| 4583 | + | |
4556 | 4584 | | |
4557 | 4585 | | |
4558 | 4586 | | |
| |||
4588 | 4616 | | |
4589 | 4617 | | |
4590 | 4618 | | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
| 4625 | + | |
| 4626 | + | |
| 4627 | + | |
| 4628 | + | |
| 4629 | + | |
| 4630 | + | |
| 4631 | + | |
| 4632 | + | |
| 4633 | + | |
| 4634 | + | |
| 4635 | + | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
| 4640 | + | |
| 4641 | + | |
4591 | 4642 | | |
4592 | 4643 | | |
4593 | 4644 | | |
| |||
0 commit comments