Commit db19fab5 by Richard Kenner

(ashldi3): Update pattern for (sign_extend (ashift ..)) to match the

current canonicalization.

From-SVN: r7743
parent ee59bdfc
...@@ -785,26 +785,19 @@ ...@@ -785,26 +785,19 @@
}" }"
[(set_attr "type" "iaddlog,shiftcm")]) [(set_attr "type" "iaddlog,shiftcm")])
;; This is the same as (sign_extend (shift X [123])).
(define_insn "" (define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r") [(set (match_operand:DI 0 "register_operand" "=r")
(ashiftrt:DI (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ") (sign_extend:DI
(match_operand:DI 2 "const_int_operand" "i")) (subreg:SI (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ")
(const_int 32)))] (match_operand:DI 2 "const_int_operand" "P"))
"INTVAL (operands[2]) >= 33 && INTVAL (operands[2]) <= 35" 0)))]
"INTVAL (operands[2]) >= 1 && INTVAL (operands[2]) <= 3"
"* "*
{ {
switch (INTVAL (operands[2])) if (operands[2] == const1_rtx)
{ return \"addl %r1,%r1,%0\";
case 33: else
return \"addl %r1,%r1,%0\"; return \"s%P2addl %r1,0,%0\";
case 34:
return \"s4addl %r1,0,%0\";
case 35:
return \"s8addl %r1,0,%0\";
default:
abort ();
}
}" }"
[(set_attr "type" "iaddlog")]) [(set_attr "type" "iaddlog")])
......
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