From: Michael Beck Date: Wed, 24 Oct 2007 21:46:48 +0000 (+0000) Subject: add test for new phi optimization X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=80b3f4b74737f0f9debf91c4591827bfc9a63663;p=libfirm add test for new phi optimization [r16339] --- diff --git a/ir/be/test/localopts.c b/ir/be/test/localopts.c index 5743cead5..e886800d7 100644 --- a/ir/be/test/localopts.c +++ b/ir/be/test/localopts.c @@ -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); }