projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3de38ec
)
Quick fix for opt/fehler191.c.
author
Sebastian Buchwald
<Sebastian.Buchwald@kit.edu>
Fri, 15 Jul 2011 09:26:28 +0000
(11:26 +0200)
committer
Sebastian Buchwald
<Sebastian.Buchwald@kit.edu>
Fri, 15 Jul 2011 09:48:33 +0000
(11:48 +0200)
This also fixes 176.gcc and 300.twolf.
ir/ir/iropt.c
patch
|
blob
|
history
diff --git
a/ir/ir/iropt.c
b/ir/ir/iropt.c
index
9f9f0e7
..
e4e86f4
100644
(file)
--- a/
ir/ir/iropt.c
+++ b/
ir/ir/iropt.c
@@
-3079,6
+3079,13
@@
static ir_node *transform_node_bitop_shift(ir_node *n)
if (is_Shl(left)) {
tv_bitop = tarval_shr(tv2, tv1);
} else if (is_Shr(left)) {
+ if (is_Or(n)) {
+ /*
+ * TODO this can be improved by checking whether
+ * the left shift produces an overflow
+ */
+ return n;
+ }
tv_bitop = tarval_shl(tv2, tv1);
} else {
assert(is_Rotl(left));