aboutsummaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-09-29 03:31:23 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2005-09-29 03:31:23 +0000
commit0f8594eee973eb004228f171b4649cb3cb9aa536 (patch)
tree31982fcfb5affaad07795757ddfef347ec078819 /gcc/expmed.c
parent4bc7cba79582442c601bf69094b351833ad61b76 (diff)
downloadgcc-0f8594eee973eb004228f171b4649cb3cb9aa536.zip
gcc-0f8594eee973eb004228f171b4649cb3cb9aa536.tar.gz
gcc-0f8594eee973eb004228f171b4649cb3cb9aa536.tar.bz2
re PR middle-end/17886 (variable rotate and unsigned long long rotate should be better optimized)
PR 17886 * expmed.c (expand_shift): Move logic to reverse rotation direction when rotating by constants ... * optabs.c (expand_binop): ... here. * config/i386/i386.md (rotrdi3): Handle 32-bit mode. (ix86_rotrdi3): New pattern. (rotldi3): Handle 32-bit mode. (ix86_rotldi3): New pattern. From-SVN: r104761
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 5da9084..19d972d 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2237,19 +2237,6 @@ expand_shift (enum tree_code code, enum machine_mode mode, rtx shifted,
temp = expand_binop (mode,
left ? rotl_optab : rotr_optab,
shifted, op1, target, unsignedp, methods);
-
- /* If we don't have the rotate, but we are rotating by a constant
- that is in range, try a rotate in the opposite direction. */
-
- if (temp == 0 && GET_CODE (op1) == CONST_INT
- && INTVAL (op1) > 0
- && (unsigned int) INTVAL (op1) < GET_MODE_BITSIZE (mode))
- temp = expand_binop (mode,
- left ? rotr_optab : rotl_optab,
- shifted,
- GEN_INT (GET_MODE_BITSIZE (mode)
- - INTVAL (op1)),
- target, unsignedp, methods);
}
else if (unsignedp)
temp = expand_binop (mode,