From 80b3f4b74737f0f9debf91c4591827bfc9a63663 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Wed, 24 Oct 2007 21:46:48 +0000 Subject: [PATCH] add test for new phi optimization [r16339] --- ir/be/test/localopts.c | 7 +++++++ 1 file changed, 7 insertions(+) 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); } -- 2.20.1