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
7a82f315
Commit
7a82f315
authored
Nov 07, 2011
by
Matthias Braun
Browse files
fix arch_dep for mul(x,0)
parent
d729c062
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/ir/irarch.c
View file @
7a82f315
...
...
@@ -572,13 +572,13 @@ ir_node *arch_dep_replace_mul_with_shifts(ir_node *irn)
ir_tarval
*
tv
;
const
ir_settings_arch_dep_t
*
params
=
be_get_backend_param
()
->
dep_param
;
/* If the architecture dependent optimizations were not initialized
or this optimization was not enabled. */
if
(
params
==
NULL
||
(
opts
&
arch_dep_mul_to_shift
)
==
0
)
return
irn
;
return
res
;
if
(
!
is_Mul
(
irn
)
||
!
mode_is_int
(
mode
))
assert
(
is_Mul
(
irn
));
if
(
!
mode_is_int
(
mode
))
return
res
;
/* we should never do the reverse transformations again
...
...
@@ -600,6 +600,11 @@ ir_node *arch_dep_replace_mul_with_shifts(ir_node *irn)
operand
=
left
;
}
/* multiplications with 0 are a special case which we leave for
* equivalent_node_Mul because the code here can't handle them */
if
(
tv
==
get_mode_null
(
mode
))
return
res
;
if
(
tv
!=
NULL
)
{
res
=
do_decomposition
(
irn
,
operand
,
tv
);
...
...
Write
Preview
Supports
Markdown
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