|
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 |
|
|
4528 | 4528 | rtx tmp0 = gen_reg_rtx (SImode), tmp1 = gen_reg_rtx (SImode); |
4529 | 4529 | emit_insn (gen_zero_extendhisi2 (tmp0, operands[1])); |
4530 | 4530 | emit_insn (gen_zero_extendhisi2 (tmp1, operands[2])); |
4531 | | - emit_insn (gen_madd_split (operands[0], tmp0, tmp1, operands[3])); |
| 4531 | + emit_insn (gen_madd_split_fused (operands[0], tmp0, tmp1, operands[3])); |
4532 | 4532 | DONE; |
4533 | 4533 | } |
4534 | 4534 | ) |
|
4542 | 4542 | "TARGET_XTHEADMAC" |
4543 | 4543 | ) |
4544 | 4544 |
|
4545 | | -(define_insn_and_split "madd_split" |
| 4545 | +(define_insn "madd_split_fused" |
4546 | 4546 | [(set (match_operand:SI 0 "register_operand" "=&r,r") |
4547 | 4547 | (plus:SI |
4548 | 4548 | (mult:SI (match_operand:SI 1 "register_operand" "r,r") |
4549 | 4549 | (match_operand:SI 2 "register_operand" "r,r")) |
4550 | 4550 | (match_operand:SI 3 "register_operand" "r,?0"))) |
4551 | 4551 | (clobber (match_scratch:SI 4 "=&r,&r"))] |
4552 | | - "riscv_is_micro_arch (rhx) && !TARGET_64BIT && (TARGET_ZMMUL || TARGET_MUL)" |
4553 | | - "#" |
4554 | | - "&& reload_completed" |
4555 | | - [(const_int 0)] |
4556 | | - "{ |
| 4552 | + "riscv_is_micro_arch (arcv_rhx100) |
| 4553 | + && !TARGET_64BIT && (TARGET_ZMMUL || TARGET_MUL)" |
| 4554 | + { |
4557 | 4555 | if (REGNO (operands[0]) == REGNO (operands[3])) |
4558 | 4556 | { |
4559 | | - emit_insn (gen_mulsi3 (operands[4], operands[1], operands[2])); |
4560 | | - emit_insn (gen_addsi3 (operands[0], operands[3], operands[4])); |
| 4557 | + return "mul\t%4,%1,%2\n\tadd\t%4,%3,%4\n\tmv\t%0,%4"; |
4561 | 4558 | } |
4562 | 4559 | else |
4563 | 4560 | { |
4564 | | - emit_insn (gen_mulsi3 (operands[0], operands[1], operands[2])); |
4565 | | - emit_insn (gen_addsi3 (operands[0], operands[0], operands[3])); |
| 4561 | + return "mul\t%0,%1,%2\n\tadd\t%0,%0,%3"; |
4566 | 4562 | } |
4567 | | - DONE; |
4568 | | - }" |
4569 | | - [(set_attr "type" "imul")] |
| 4563 | + } |
| 4564 | + [(set_attr "type" "imul_fused")] |
4570 | 4565 | ) |
4571 | 4566 |
|
4572 | 4567 | ;; String compare with length insn. |
|
0 commit comments