projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62acf5f
)
(gen_shl_and): Try to generate shorter constant for and.
author
Joern Rennecke
<amylaar@gcc.gnu.org>
Wed, 6 Nov 1996 03:48:54 +0000
(
03:48
+0000)
committer
Joern Rennecke
<amylaar@gcc.gnu.org>
Wed, 6 Nov 1996 03:48:54 +0000
(
03:48
+0000)
From-SVN: r13101
gcc/config/sh/sh.c
patch
|
blob
|
history
diff --git
a/gcc/config/sh/sh.c
b/gcc/config/sh/sh.c
index cafbc5169ca21fcd7cbb8e19e7ab3b6233081014..c1bfc0e7476265f05bc8ea6771d35e7a32c8b549 100644
(file)
--- a/
gcc/config/sh/sh.c
+++ b/
gcc/config/sh/sh.c
@@
-1273,6
+1273,11
@@
gen_shl_and (dest, left_rtx, mask_rtx, source)
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);
/* Don't expand fine-grained when combining, because that will
make the pattern fail. */
if (rtx_equal_function_value_matters