From 3993a824a13bf3500702e6cf71a88551277752a1 Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Thu, 13 Sep 2007 19:01:01 +0000 Subject: [PATCH] more tests added [r15794] --- ir/be/test/localopts.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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); } -- 2.20.1