projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
133cd80
)
Prevent computations with tarval_bad.
author
Sebastian Buchwald
<Sebastian.Buchwald@kit.edu>
Thu, 10 Nov 2011 09:50:36 +0000
(10:50 +0100)
committer
Sebastian Buchwald
<Sebastian.Buchwald@kit.edu>
Thu, 10 Nov 2011 09:51:10 +0000
(10:51 +0100)
This fixes opt/fehler206.c.
ir/opt/opt_osr.c
patch
|
blob
|
history
diff --git
a/ir/opt/opt_osr.c
b/ir/opt/opt_osr.c
index
e0dffba
..
f0e705a
100644
(file)
--- a/
ir/opt/opt_osr.c
+++ b/
ir/opt/opt_osr.c
@@
-1156,6
+1156,12
@@
static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
panic("Unsupported opcode");
}
+ if (tv == tarval_bad || tv_init == tarval_bad) {
+ tarval_set_integer_overflow_mode(ovmode);
+ DB((dbg, LEVEL_4, " = OVERFLOW"));
+ return NULL;
+ }
+
if (pscc->code == iro_Add) {
tv_end = tarval_add(tv, tv_incr);
} else {
@@
-1165,7
+1171,7
@@
static ir_node *applyOneEdge(ir_node *iv, ir_node *rc, LFTR_edge *e, iv_env *env
tarval_set_integer_overflow_mode(ovmode);
- if (tv
== tarval_bad || tv_init == tarval_bad || tv
_end == tarval_bad) {
+ if (tv_end == tarval_bad) {
DB((dbg, LEVEL_4, " = OVERFLOW"));
return NULL;
}