|
518 | 518 | vslideup,vslidedown,vislide1up,vislide1down,vfslide1up,vfslide1down, |
519 | 519 | vgather,vcompress,vmov,vector,vandn,vbrev,vbrev8,vrev8,vclz,vctz,vcpop,vrol,vror,vwsll, |
520 | 520 | vclmul,vclmulh,vghsh,vgmul,vaesef,vaesem,vaesdf,vaesdm,vaeskf1,vaeskf2,vaesz, |
521 | | - vsha2ms,vsha2ch,vsha2cl,vsm4k,vsm4r,vsm3me,vsm3c,vfncvtbf16,vfwcvtbf16,vfwmaccbf16, |
| 521 | + vsha2ms,vsha2ch,vsha2cl,vsm4k,vsm4r,vsm3me,vsm3c,vfncvtbf16,vfwcvtbf16,vfwmaccbf16,imul_fused, |
522 | 522 | sf_vc,sf_vc_se" |
523 | 523 | (cond [(eq_attr "got" "load") (const_string "load") |
524 | 524 |
|
|
4552 | 4552 | rtx tmp0 = gen_reg_rtx (SImode), tmp1 = gen_reg_rtx (SImode); |
4553 | 4553 | emit_insn (gen_zero_extendhisi2 (tmp0, operands[1])); |
4554 | 4554 | emit_insn (gen_zero_extendhisi2 (tmp1, operands[2])); |
4555 | | - emit_insn (gen_madd_split (operands[0], tmp0, tmp1, operands[3])); |
| 4555 | + emit_insn (gen_madd_split_fused (operands[0], tmp0, tmp1, operands[3])); |
4556 | 4556 | DONE; |
4557 | 4557 | } |
4558 | 4558 | ) |
|
4566 | 4566 | "TARGET_XTHEADMAC" |
4567 | 4567 | ) |
4568 | 4568 |
|
4569 | | -(define_insn_and_split "madd_split" |
| 4569 | +(define_insn "madd_split_fused" |
4570 | 4570 | [(set (match_operand:SI 0 "register_operand" "=&r,r") |
4571 | 4571 | (plus:SI |
4572 | 4572 | (mult:SI (match_operand:SI 1 "register_operand" "r,r") |
4573 | 4573 | (match_operand:SI 2 "register_operand" "r,r")) |
4574 | 4574 | (match_operand:SI 3 "register_operand" "r,?0"))) |
4575 | 4575 | (clobber (match_scratch:SI 4 "=&r,&r"))] |
4576 | | - "riscv_is_micro_arch (rhx) && !TARGET_64BIT && (TARGET_ZMMUL || TARGET_MUL)" |
4577 | | - "#" |
4578 | | - "&& reload_completed" |
4579 | | - [(const_int 0)] |
4580 | | - "{ |
| 4576 | + "riscv_is_micro_arch (arcv_rhx100) |
| 4577 | + && !TARGET_64BIT && (TARGET_ZMMUL || TARGET_MUL)" |
| 4578 | + { |
4581 | 4579 | if (REGNO (operands[0]) == REGNO (operands[3])) |
4582 | 4580 | { |
4583 | | - emit_insn (gen_mulsi3 (operands[4], operands[1], operands[2])); |
4584 | | - emit_insn (gen_addsi3 (operands[0], operands[3], operands[4])); |
| 4581 | + return "mul\t%4,%1,%2\n\tadd\t%4,%3,%4\n\tmv\t%0,%4"; |
4585 | 4582 | } |
4586 | 4583 | else |
4587 | 4584 | { |
4588 | | - emit_insn (gen_mulsi3 (operands[0], operands[1], operands[2])); |
4589 | | - emit_insn (gen_addsi3 (operands[0], operands[0], operands[3])); |
| 4585 | + return "mul\t%0,%1,%2\n\tadd\t%0,%0,%3"; |
4590 | 4586 | } |
4591 | | - DONE; |
4592 | | - }" |
4593 | | - [(set_attr "type" "imul")] |
| 4587 | + } |
| 4588 | + [(set_attr "type" "imul_fused")] |
4594 | 4589 | ) |
4595 | 4590 |
|
4596 | 4591 | ;; String compare with length insn. |
|
0 commit comments