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
0a6b9af5
Commit
0a6b9af5
authored
Jan 02, 2014
by
Christoph Mallon
Browse files
Use new_rd_Const_long() instead of new_tarval_from_long() + new_rd_Const().
parent
76870bab
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/iropt.c
View file @
0a6b9af5
...
...
@@ -5534,8 +5534,7 @@ static ir_node *transform_Mux_set(ir_node *n, ir_relation relation)
ir_graph
*
irg
=
get_irn_irg
(
block
);
unsigned
shift_amount
=
get_tarval_highest_bit
(
tv
);
ir_tarval
*
tv
=
new_tarval_from_long
(
shift_amount
,
mode_Iu
);
ir_node
*
shift_cnt
=
new_rd_Const
(
dbgi
,
irg
,
tv
);
ir_node
*
shift_cnt
=
new_rd_Const_long
(
dbgi
,
irg
,
mode_Iu
,
shift_amount
);
ir_node
*
shift
=
new_rd_Shr
(
dbgi
,
block
,
a
,
shift_cnt
,
calc_mode
);
ir_tarval
*
one
=
get_mode_one
(
calc_mode
);
ir_node
*
c
=
new_rd_Const
(
dbgi
,
irg
,
one
);
...
...
@@ -5636,8 +5635,7 @@ static ir_node *transform_Mux_set(ir_node *n, ir_relation relation)
ir_graph
*
irg
=
get_irn_irg
(
block
);
unsigned
bits
=
get_mode_size_bits
(
calc_mode
);
ir_tarval
*
tv
=
new_tarval_from_long
(
bits
-
1
,
mode_Iu
);
ir_node
*
shift_cnt
=
new_rd_Const
(
dbgi
,
irg
,
tv
);
ir_node
*
shift_cnt
=
new_rd_Const_long
(
dbgi
,
irg
,
mode_Iu
,
bits
-
1
);
ir_node
*
shift
=
new_rd_Shr
(
dbgi
,
block
,
sub
,
shift_cnt
,
calc_mode
);
if
(
calc_mode
!=
dest_mode
)
{
shift
=
new_rd_Conv
(
dbgi
,
block
,
shift
,
dest_mode
);
...
...
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