diff options
author | J"orn Rennecke <amylaar@cygnus.co.uk> | 1998-05-15 03:26:52 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 1998-05-15 04:26:52 +0100 |
commit | 61fb6bac57de2f2dc9fea793c0050fea84d52ab8 (patch) | |
tree | e6a52b632769461da04fae72d50b40cecea4703c /gcc/config/sh | |
parent | 08e2846bd7a21136bfa7c65dbb22936b6f384ecc (diff) | |
download | gcc-61fb6bac57de2f2dc9fea793c0050fea84d52ab8.tar.gz |
sh.c (gen_shl_and): Don't sign extend constant for kind two.
* sh.c (gen_shl_and): Don't sign extend constant for kind two.
Abort if trying to split kind 3 or 4 outside of combine.
From-SVN: r19772
Diffstat (limited to 'gcc/config/sh')
-rw-r--r-- | gcc/config/sh/sh.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index f9a3caa874e..ac30a6676fa 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -1335,13 +1335,13 @@ gen_shl_and (dest, left_rtx, mask_rtx, source) } case 4: shift_gen_fun = gen_shifty_op; - case 2: case 3: /* If the topmost bit that matters is set, set the topmost bits that don't matter. This way, we might be able to get a shorter signed constant. */ if (mask & ((HOST_WIDE_INT)1 << 31 - total_shift)) mask |= (HOST_WIDE_INT)~0 << (31 - total_shift); + case 2: /* Don't expand fine-grained when combining, because that will make the pattern fail. */ if (rtx_equal_function_value_matters @@ -1349,6 +1349,10 @@ gen_shl_and (dest, left_rtx, mask_rtx, source) { rtx operands[3]; + /* Cases 3 and 4 should be handled by this split + only while combining */ + if (kind > 2) + abort (); if (right) { emit_insn (gen_lshrsi3 (dest, source, GEN_INT (right))); |