From: Christoph Mallon Date: Wed, 5 Dec 2012 09:22:14 +0000 (+0100) Subject: fp-vrp: Simplify test when optimising Minus(x0...0). X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=22c2fe6b8fbb1f9886016f468be8a178aacee6aa;p=libfirm fp-vrp: Simplify test when optimising Minus(x0...0). It is sufficient to test, whether the zero bits equal the minimal value. If they are all zero, the result is constant and this optimisation is unnecessary. --- diff --git a/ir/opt/fp-vrp.c b/ir/opt/fp-vrp.c index 5a06aa59c..f365ec2dc 100644 --- a/ir/opt/fp-vrp.c +++ b/ir/opt/fp-vrp.c @@ -755,7 +755,7 @@ exchange_only: bitinfo const *const b = get_bitinfo(op); ir_tarval *const min = get_mode_min(mode); - if (tarval_is_all_one(tarval_or(min, tarval_not(b->z)))) { + if (b->z == min) { DB((dbg, LEVEL_2, "%+F(%+F) is superfluous\n", irn, op)); exchange(irn, op); env->modified = 1;