From: Michael Beck Date: Thu, 13 Sep 2007 19:01:01 +0000 (+0000) Subject: more tests added X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=3993a824a13bf3500702e6cf71a88551277752a1;p=libfirm more tests added [r15794] --- diff --git a/ir/be/test/localopts.c b/ir/be/test/localopts.c index 6a10aad11..b706626c1 100644 --- a/ir/be/test/localopts.c +++ b/ir/be/test/localopts.c @@ -99,6 +99,14 @@ int add1(int x) { return x + ~x; } +int shr1(int x) { + return -(x >> 31); +} + +int shrs1(unsigned x) { + return -(x >> 31); +} + int main(void) { #define TU(func,x,expect) \ @@ -130,4 +138,6 @@ int main(void) TB(and1, 42, 17, 42); TB(and2, 42, 17, 42^17); TU(add1, -3, -1); + TU(shr1, -3, 1); + TU(shrs1, -3, -1); }