Commit cb8f73be by Richard Kenner Committed by Richard Kenner

optabs.c (widen_operand): Only call convert_modes for promoted SUBREG if signedness matches.

	* optabs.c (widen_operand): Only call convert_modes for
	promoted SUBREG if signedness matches.
	* config/alpha/alpha.md (*addsi_se2, *subsi_se2): New patterns.

From-SVN: r50004
parent e2743a17
Sun Feb 24 07:41:31 2002 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* optabs.c (widen_operand): Only call convert_modes for
promoted SUBREG if signedness matches.
* config/alpha/alpha.md (*addsi_se2, *subsi_se2): New patterns.
2002-02-23 Neil Booth <neil@daikokuya.demon.co.uk>
* cpplib.c (glue_header_name): Use local buffer to build up
......
......@@ -564,6 +564,17 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi"
addl %r1,%2,%0
subl %r1,%n2,%0")
(define_insn "*addsi_se2"
[(set (match_operand:DI 0 "register_operand" "=r,r")
(sign_extend:DI
(subreg:SI (plus:DI (match_operand:DI 1 "reg_or_0_operand" "%rJ,rJ")
(match_operand:DI 2 "sext_add_operand" "rI,O"))
0)))]
""
"@
addl %r1,%2,%0
subl %r1,%n2,%0")
(define_split
[(set (match_operand:DI 0 "register_operand" "")
(sign_extend:DI
......@@ -844,6 +855,15 @@ fadd,fmul,fcpys,fdiv,fsqrt,misc,mvi,ftoi,itof,multi"
""
"subl %r1,%2,%0")
(define_insn "*subsi_se2"
[(set (match_operand:DI 0 "register_operand" "=r")
(sign_extend:DI
(subreg:SI (minus:DI (match_operand:DI 1 "reg_or_0_operand" "rJ")
(match_operand:DI 2 "reg_or_8bit_operand" "rI"))
0)))]
""
"subl %r1,%2,%0")
(define_insn "subvsi3"
[(set (match_operand:SI 0 "register_operand" "=r")
(minus:SI (match_operand:SI 1 "reg_or_0_operand" "rJ")
......
......@@ -191,7 +191,8 @@ widen_operand (op, mode, oldmode, unsignedp, no_extend)
do so. */
if (! no_extend
|| GET_MODE (op) == VOIDmode
|| (GET_CODE (op) == SUBREG && SUBREG_PROMOTED_VAR_P (op)))
|| (GET_CODE (op) == SUBREG && SUBREG_PROMOTED_VAR_P (op)
&& SUBREG_PROMOTED_UNSIGNED_P (op) == unsignedp))
return convert_modes (mode, oldmode, op, unsignedp);
/* If MODE is no wider than a single word, we return a paradoxical
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment