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
40ed522d
Commit
40ed522d
authored
Jan 19, 2015
by
yb9976
Browse files
Merge Add and Sub cases.
parent
c6bb42c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/opt/opt_osr.c
View file @
40ed522d
...
...
@@ -494,23 +494,15 @@ static bool is_counter_iv(ir_node *iv, iv_env *env)
ir_opcode
code
=
iro_Bad
;
pscc
->
code
=
iro_Bad
;
for
(
ir_node
*
irn
=
pscc
->
head
;
irn
!=
NULL
;
irn
=
e
->
next
)
{
if
(
is_Add
(
irn
))
{
if
(
is_Add
(
irn
)
||
is_Sub
(
irn
)
)
{
if
(
have_incr
!=
NULL
)
return
false
;
have_incr
=
get_
Add
_right
(
irn
);
have_incr
=
get_
binop
_right
(
irn
);
if
(
!
is_Const
(
have_incr
))
{
return
false
;
}
code
=
iro_Add
;
}
else
if
(
is_Sub
(
irn
))
{
if
(
have_incr
!=
NULL
)
return
false
;
have_incr
=
get_Sub_right
(
irn
);
if
(
!
is_Const
(
have_incr
))
return
false
;
code
=
iro_Sub
;
code
=
get_irn_opcode
(
irn
);
}
else
if
(
is_Phi
(
irn
))
{
int
i
;
...
...
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