example for the new commutative combo
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 22 Oct 2008 13:44:19 +0000 (13:44 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 22 Oct 2008 13:44:19 +0000 (13:44 +0000)
[r23104]

ir/be/test/combo_comm.c [new file with mode: 0644]

diff --git a/ir/be/test/combo_comm.c b/ir/be/test/combo_comm.c
new file mode 100644 (file)
index 0000000..7571cc9
--- /dev/null
@@ -0,0 +1,19 @@
+/*$ -fcombo -fno-inline $*/
+int test(int a, int b) {
+       int c, d;
+
+       c = a + b;
+
+       if (0)
+               d = 0;
+       else
+               d = b;
+
+       d = d + a;
+
+       return c + d;
+}
+
+int main(int argc, char *argv[]) {
+       return test(2,3) != 10;
+}