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
736b2698
Commit
736b2698
authored
Sep 14, 2007
by
Michael Beck
Browse files
test local cse
[r15799]
parent
b9014b75
Changes
1
Hide whitespace changes
Inline
Side-by-side
ir/be/test/csetest.c
0 → 100644
View file @
736b2698
/*$ -fno-inline $*/
#include
<stdio.h>
int
cse1
(
int
a
)
{
int
x
=
a
*
3
;
int
y
=
3
*
a
;
return
x
+
y
;
}
int
cse2
(
int
a
,
int
b
)
{
int
x
=
a
*
b
;
int
y
=
b
*
a
;
return
x
-
y
;
}
int
main
()
{
printf
(
"cse1(3) = %d (should be 18)
\n
"
,
cse1
(
3
));
printf
(
"cse2(3,4) = %d (should be 0)
\n
"
,
cse2
(
3
,
4
));
return
0
;
}
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