add test for new phi optimization
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 24 Oct 2007 21:46:48 +0000 (21:46 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Wed, 24 Oct 2007 21:46:48 +0000 (21:46 +0000)
[r16339]

ir/be/test/localopts.c

index 5743cea..e886800 100644 (file)
@@ -187,6 +187,12 @@ int conv3(signed char a) {
        return (unsigned)a != 0;
 }
 
+int phi(int x) {
+       int a = x ? 23 : 42;
+       int b = x ? 42 : 23;
+       return a + b;
+}
+
 int main(void)
 {
 #define TU(func,x,expect) \
@@ -247,4 +253,5 @@ int main(void)
        TU(and5, 7, 1);
        TU(or1, 7, 1);
        TU(or2, 7, 0);
+       TU(phi1, 1, 65);
 }