From cd764269a16bdf66160c7272c9340afd57e654fa Mon Sep 17 00:00:00 2001 From: Pat Haugen Date: Fri, 10 Nov 2017 16:46:54 +0000 Subject: [PATCH] power9.md (power9-qpdiv): Correct DFU pipe usage. * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage. (power9-qpmul): New. * rs6000/rs6000.md ("type" attr): Add qmul. (mul3, fma4_hw, *fms4_hw, *nfma4_hw, *nfms4_hw, mul3_odd, fma4_odd, *fms4_odd, *nfma4_odd, *nfms4_odd): Change type to qmul. From-SVN: r254631 --- gcc/ChangeLog | 9 +++++++++ gcc/config/rs6000/power9.md | 8 +++++++- gcc/config/rs6000/rs6000.md | 22 +++++++++++----------- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7e4093a41e7..82665bd5ccb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2017-11-10 Pat Haugen + + * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage. + (power9-qpmul): New. + * rs6000/rs6000.md ("type" attr): Add qmul. + (mul3, fma4_hw, *fms4_hw, *nfma4_hw, + *nfms4_hw, mul3_odd, fma4_odd, *fms4_odd, + *nfma4_odd, *nfms4_odd): Change type to qmul. + 2017-11-10 Martin Sebor PR c/81117 diff --git a/gcc/config/rs6000/power9.md b/gcc/config/rs6000/power9.md index 217864faaed..82e4b1cf65c 100644 --- a/gcc/config/rs6000/power9.md +++ b/gcc/config/rs6000/power9.md @@ -434,7 +434,13 @@ (and (eq_attr "type" "vecdiv") (eq_attr "size" "128") (eq_attr "cpu" "power9")) - "DU_super_power9,dfu_power9") + "DU_super_power9,dfu_power9*44") + +(define_insn_reservation "power9-qpmul" 24 + (and (eq_attr "type" "qmul") + (eq_attr "size" "128") + (eq_attr "cpu" "power9")) + "DU_super_power9,dfu_power9*12") (define_insn_reservation "power9-mffgpr" 2 (and (eq_attr "type" "mffgpr") diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index b800276692d..7025b0049ce 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -182,7 +182,7 @@ cmp, branch,jmpreg,mfjmpr,mtjmpr,trap,isync,sync,load_l,store_c, cr_logical,delayed_cr,mfcr,mfcrf,mtcr, - fpcompare,fp,fpsimple,dmul,sdiv,ddiv,ssqrt,dsqrt, + fpcompare,fp,fpsimple,dmul,qmul,sdiv,ddiv,ssqrt,dsqrt, vecsimple,veccomplex,vecdiv,veccmp,veccmpsimple,vecperm, vecfloat,vecfdiv,vecdouble,mffgpr,mftgpr,crypto, veclogical,veccmpfx,vecexts,vecmove, @@ -14335,7 +14335,7 @@ (match_operand:IEEE128 2 "altivec_register_operand" "v")))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsmulqp %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "div3" @@ -14437,7 +14437,7 @@ (match_operand:IEEE128 3 "altivec_register_operand" "0")))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsmaddqp %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "*fms4_hw" @@ -14449,7 +14449,7 @@ (match_operand:IEEE128 3 "altivec_register_operand" "0"))))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsmsubqp %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "*nfma4_hw" @@ -14461,7 +14461,7 @@ (match_operand:IEEE128 3 "altivec_register_operand" "0"))))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsnmaddqp %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "*nfms4_hw" @@ -14474,7 +14474,7 @@ (match_operand:IEEE128 3 "altivec_register_operand" "0")))))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsnmsubqp %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "extend2_hw" @@ -14749,7 +14749,7 @@ UNSPEC_MUL_ROUND_TO_ODD))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsmulqpo %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "div3_odd" @@ -14782,7 +14782,7 @@ UNSPEC_FMA_ROUND_TO_ODD))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsmaddqpo %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "*fms4_odd" @@ -14795,7 +14795,7 @@ UNSPEC_FMA_ROUND_TO_ODD))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsmsubqpo %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "*nfma4_odd" @@ -14808,7 +14808,7 @@ UNSPEC_FMA_ROUND_TO_ODD)))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsnmaddqpo %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "*nfms4_odd" @@ -14822,7 +14822,7 @@ UNSPEC_FMA_ROUND_TO_ODD)))] "TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)" "xsnmsubqpo %0,%1,%2" - [(set_attr "type" "vecfloat") + [(set_attr "type" "qmul") (set_attr "size" "128")]) (define_insn "truncdf2_odd" -- 2.30.2