This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c/10083 (umul_highpart on Alpha)
- From: Richard Henderson <rth at redhat dot com>
- To: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 30 Mar 2003 11:01:38 -0800
- Subject: Re: [PATCH] Fix PR c/10083 (umul_highpart on Alpha)
- References: <87u1dt9aee.fsf@student.uni-tuebingen.de>
On Sun, Mar 23, 2003 at 07:59:37PM +0100, Falk Hueffner wrote:
> * config/alpha/alpha.md (umuldi3_highpart): Fix predicate.
I commited this variant instead.
r~
* config/alpha/alpha.md (umuldi3_highpart): Change to expander;
don't zero_extend const inputs.
Index: config/alpha/alpha.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/alpha/alpha.md,v
retrieving revision 1.206
diff -c -p -d -r1.206 alpha.md
*** config/alpha/alpha.md 28 Mar 2003 05:14:36 -0000 1.206
--- config/alpha/alpha.md 30 Mar 2003 18:58:09 -0000
*************** fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi
*** 750,766 ****
"mulqv %r1,%2,%0"
[(set_attr "type" "imul")])
! (define_insn "umuldi3_highpart"
[(set (match_operand:DI 0 "register_operand" "=r")
(truncate:DI
(lshiftrt:TI
(mult:TI (zero_extend:TI
! (match_operand:DI 1 "reg_or_0_operand" "%rJ"))
(zero_extend:TI
! (match_operand:DI 2 "reg_or_8bit_operand" "rI")))
(const_int 64))))]
""
! "umulh %r1,%2,%0"
[(set_attr "type" "imul")
(set_attr "opsize" "udi")])
--- 750,780 ----
"mulqv %r1,%2,%0"
[(set_attr "type" "imul")])
! (define_expand "umuldi3_highpart"
! [(set (match_operand:DI 0 "register_operand" "")
! (truncate:DI
! (lshiftrt:TI
! (mult:TI (zero_extend:TI
! (match_operand:DI 1 "register_operand" ""))
! (match_operand:DI 2 "reg_or_8bit_operand" ""))
! (const_int 64))))]
! ""
! {
! if (REG_P (operands[2]))
! operands[2] = gen_rtx_ZERO_EXTEND (TImode, operands[2]);
! })
!
! (define_insn "*umuldi3_highpart_reg"
[(set (match_operand:DI 0 "register_operand" "=r")
(truncate:DI
(lshiftrt:TI
(mult:TI (zero_extend:TI
! (match_operand:DI 1 "register_operand" "r"))
(zero_extend:TI
! (match_operand:DI 2 "register_operand" "r")))
(const_int 64))))]
""
! "umulh %1,%2,%0"
[(set_attr "type" "imul")
(set_attr "opsize" "udi")])