From c969253262cc58c88bbe6ceaabb36a90a1b61ad2 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Wed, 14 Sep 2005 01:12:43 +0000 Subject: [PATCH] re PR target/22068 (Multiply-immediate opportunity) PR target/22068 * config/rs6000/rs6000.md (muldi3): Add mulli alternative. From-SVN: r104255 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.md | 17 ++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 79973924aee..d4944d516f5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-09-14 David Edelsohn + + PR target/22068 + * config/rs6000/rs6000.md (muldi3): Add mulli alternative. + 2005-09-14 Alan Modra * config/rs6000/linux64.h (DBX_OUTPUT_BRAC): Treat function name diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 6171cadcaaa..8868f53e965 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -5825,12 +5825,19 @@ "") (define_insn "muldi3" - [(set (match_operand:DI 0 "gpc_reg_operand" "=r") - (mult:DI (match_operand:DI 1 "gpc_reg_operand" "%r") - (match_operand:DI 2 "gpc_reg_operand" "r")))] + [(set (match_operand:DI 0 "gpc_reg_operand" "=r,r") + (mult:DI (match_operand:DI 1 "gpc_reg_operand" "%r,r") + (match_operand:DI 2 "reg_or_short_operand" "r,I")))] "TARGET_POWERPC64" - "mulld %0,%1,%2" - [(set_attr "type" "lmul")]) + "@ + mulld %0,%1,%2 + mulli %0,%1,%2" + [(set (attr "type") + (cond [(match_operand:SI 2 "s8bit_cint_operand" "") + (const_string "imul3") + (match_operand:SI 2 "short_cint_operand" "") + (const_string "imul2")] + (const_string "lmul")))]) (define_insn "*muldi3_internal1" [(set (match_operand:CC 0 "cc_reg_operand" "=x,?y") -- 2.30.2