diff options
author | Richard Henderson <rth@cygnus.com> | 1998-06-04 20:10:46 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 1998-06-04 20:10:46 -0700 |
commit | 989f090c07b76953a33485bf2e35cdee3c774d5d (patch) | |
tree | 7f79bb20c7c1aa49d865832d4e7165f613e7a930 /gcc | |
parent | b9e199ac5d521975b00e624d948c6dc42f942aa5 (diff) | |
download | gcc-989f090c07b76953a33485bf2e35cdee3c774d5d.zip gcc-989f090c07b76953a33485bf2e35cdee3c774d5d.tar.gz gcc-989f090c07b76953a33485bf2e35cdee3c774d5d.tar.bz2 |
* alpha.md (insxh-1): New insxl pattern for combine.
From-SVN: r20239
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.md | 33 |
2 files changed, 37 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4a9e3a2..4cc3519 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Fri Jun 5 03:05:34 1998 Richard Henderson <rth@cygnus.com> + + * alpha.md (insxh-1): New insxl pattern for combine. + Fri Jun 5 01:12:15 1998 H.J. Lu (hjl@gnu.org) * i386/i386.c (output_fp_conditional_move): New function diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index 57e2c44..6c001e3 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -1614,6 +1614,39 @@ "insql %1,%2,%0" [(set_attr "type" "shift")]) +;; Combine has this sometimes habit of moving the and outside of the +;; shift, making life more interesting. + +(define_insn "" + [(set (match_operand:DI 0 "register_operand" "=r") + (and:DI (ashift:DI (match_operand:DI 1 "register_operand" "r") + (match_operand:DI 2 "mul8_operand" "I")) + (match_operand:DI 3 "immediate_operand" "i")))] + "HOST_BITS_PER_WIDE_INT == 64 + && GET_CODE (operands[3]) == CONST_INT + && (((unsigned HOST_WIDE_INT) 0xff << INTVAL (operands[2]) + == INTVAL (operands[3])) + || ((unsigned HOST_WIDE_INT) 0xffff << INTVAL (operands[2]) + == INTVAL (operands[3])) + || ((unsigned HOST_WIDE_INT) 0xffffffff << INTVAL (operands[2]) + == INTVAL (operands[3])))" + "* +{ +#if HOST_BITS_PER_WIDE_INT == 64 + if ((unsigned HOST_WIDE_INT) 0xff << INTVAL (operands[2]) + == INTVAL (operands[3])) + return \"insbl %1,%s2,%0\"; + if ((unsigned HOST_WIDE_INT) 0xffff << INTVAL (operands[2]) + == INTVAL (operands[3])) + return \"inswl %1,%s2,%0\"; + if ((unsigned HOST_WIDE_INT) 0xffffffff << INTVAL (operands[2]) + == INTVAL (operands[3])) + return \"insll %1,%s2,%0\"; +#endif + abort(); +}" + [(set_attr "type" "shift")]) + ;; We do not include the insXh insns because they are complex to express ;; and it does not appear that we would ever want to generate them. ;; |