Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
5f166765
Commit
5f166765
authored
Oct 08, 2010
by
Matthias Braun
Browse files
lower_dw: Remove RotL special case, normal code produces the same result
[r28054]
parent
ed498a05
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/lower/lower_dw.c
View file @
5f166765
...
...
@@ -1041,16 +1041,6 @@ static void prepare_links_and_handle_rotl(ir_node *node, void *env)
dbg_info
*
dbg
;
optimization_state_t
state
;
if
(
get_mode_arithmetic
(
mode
)
==
irma_twos_complement
&&
is_Const
(
right
))
{
tarval
*
tv
=
get_Const_tarval
(
right
);
if
(
tarval_is_long
(
tv
)
&&
get_tarval_long
(
tv
)
==
(
long
)
get_mode_size_bits
(
mode
))
{
/* will be optimized in lower_Rotl() */
return
;
}
}
/* replace the Rotl(x,y) by an Or(Shl(x,y), Shr(x,64-y)) and lower those */
irg
=
get_irn_irg
(
node
);
dbg
=
get_irn_dbg_info
(
node
);
...
...
@@ -1083,30 +1073,6 @@ static void prepare_links_and_handle_rotl(ir_node *node, void *env)
}
}
/**
* Translate a special case Rotl(x, sizeof(w)).
*/
static
void
lower_Rotl
(
ir_node
*
node
,
ir_mode
*
mode
,
lower_env_t
*
env
)
{
ir_node
*
right
=
get_Rotl_right
(
node
);
ir_node
*
left
=
get_Rotl_left
(
node
);
ir_node
*
h
,
*
l
;
unsigned
idx
=
get_irn_idx
(
left
);
(
void
)
right
;
(
void
)
mode
;
assert
(
get_mode_arithmetic
(
mode
)
==
irma_twos_complement
&&
is_Const
(
right
)
&&
tarval_is_long
(
get_Const_tarval
(
right
))
&&
get_tarval_long
(
get_Const_tarval
(
right
))
==
(
long
)
get_mode_size_bits
(
mode
));
l
=
env
->
entries
[
idx
]
->
low_word
;
h
=
env
->
entries
[
idx
]
->
high_word
;
idx
=
get_irn_idx
(
node
);
env
->
entries
[
idx
]
->
low_word
=
h
;
env
->
entries
[
idx
]
->
high_word
=
l
;
}
/**
* Translate an Unop.
*
...
...
@@ -2617,7 +2583,6 @@ void lower_dw_ops(const lwrdw_param_t *param)
enter_lower_func
(
op_Or
,
lower_Or
);
enter_lower_func
(
op_Phi
,
lower_Phi
);
enter_lower_func
(
op_Return
,
lower_Return
);
enter_lower_func
(
op_Rotl
,
lower_Rotl
);
enter_lower_func
(
op_Sel
,
lower_Sel
);
enter_lower_func
(
op_Shl
,
lower_Shl
);
enter_lower_func
(
op_Shr
,
lower_Shr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment