Skip to content

Commit 702fe73

Browse files
Claudiu Zissulescuartemiy-volkov
authored andcommitted
arc64: Increase div costs, encourage syntetic ones.
1 parent 8576b07 commit 702fe73

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

gcc/config/arc64/arc64.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3495,9 +3495,12 @@ arc64_rtx_costs (rtx x, machine_mode mode, rtx_code outer,
34953495
case ASHIFT:
34963496
case ASHIFTRT:
34973497
case LSHIFTRT:
3498+
case MULT:
3499+
return true;
3500+
34983501
case DIV:
34993502
case UDIV:
3500-
case MULT:
3503+
*cost = COSTS_N_INSNS (12);
35013504
return true;
35023505

35033506
default:

gcc/config/arc64/arith.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@
862862
(set_attr "length" "4")])
863863

864864

865-
;; 32 x 32 -> 64 (signed/unsigned)
865+
;; 32 x 32 -> 64 (signed/unsigned) Triggers FAIL: c-c++-common/torture/builtin-arith-overflow-12.c
866866
;worse results;(define_expand "<ANY_EXTEND:su_optab>mulsidi3"
867867
;worse results; [(parallel [(set (match_operand:DI 0 "register_operand")
868868
;worse results; (mult:DI
@@ -901,6 +901,7 @@
901901
;worse results; [(set_attr "length" "4,4,8")
902902
;worse results; (set_attr "type" "mpy")])
903903

904+
904905
;; 16bit operations using SIMD instructions
905906
(define_insn "<optab>hi3"
906907
[(set (match_operand:HI 0 "register_operand" "=r, r,r")

0 commit comments

Comments
 (0)