projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76e5562
)
fp-vrp: Simplify test when optimising Minus(x0...0).
author
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 5 Dec 2012 09:22:14 +0000
(10:22 +0100)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Wed, 5 Dec 2012 09:28:20 +0000
(10:28 +0100)
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.
ir/opt/fp-vrp.c
patch
|
blob
|
history
diff --git
a/ir/opt/fp-vrp.c
b/ir/opt/fp-vrp.c
index
5a06aa5
..
f365ec2
100644
(file)
--- 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;