aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-07-12 12:19:40 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-07-12 12:19:40 -0400
commitdb19fab5ec790d202f7a7ed827047f845f884a20 (patch)
tree6e93cb0b2eb670a3472510442274294f5f190b01 /gcc
parentee59bdfc51d6ebb0f1829abe739c69873210d6d5 (diff)
downloadgcc-db19fab5ec790d202f7a7ed827047f845f884a20.zip
gcc-db19fab5ec790d202f7a7ed827047f845f884a20.tar.gz
gcc-db19fab5ec790d202f7a7ed827047f845f884a20.tar.bz2
(ashldi3): Update pattern for (sign_extend (ashift ..)) to match the
current canonicalization. From-SVN: r7743
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/alpha/alpha.md25
1 files changed, 9 insertions, 16 deletions
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md
index 07b7dd3..fc9a5b8 100644
--- a/gcc/config/alpha/alpha.md
+++ b/gcc/config/alpha/alpha.md
@@ -785,26 +785,19 @@
}"
[(set_attr "type" "iaddlog,shiftcm")])
-;; This is the same as (sign_extend (shift X [123])).
(define_insn ""
[(set (match_operand:DI 0 "register_operand" "=r")
- (ashiftrt:DI (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ")
- (match_operand:DI 2 "const_int_operand" "i"))
- (const_int 32)))]
- "INTVAL (operands[2]) >= 33 && INTVAL (operands[2]) <= 35"
+ (sign_extend:DI
+ (subreg:SI (ashift:DI (match_operand:DI 1 "reg_or_0_operand" "rJ")
+ (match_operand:DI 2 "const_int_operand" "P"))
+ 0)))]
+ "INTVAL (operands[2]) >= 1 && INTVAL (operands[2]) <= 3"
"*
{
- switch (INTVAL (operands[2]))
- {
- case 33:
- return \"addl %r1,%r1,%0\";
- case 34:
- return \"s4addl %r1,0,%0\";
- case 35:
- return \"s8addl %r1,0,%0\";
- default:
- abort ();
- }
+ if (operands[2] == const1_rtx)
+ return \"addl %r1,%r1,%0\";
+ else
+ return \"s%P2addl %r1,0,%0\";
}"
[(set_attr "type" "iaddlog")])