Commit 2e255e4b authored by Johannes Franz's avatar Johannes Franz
Browse files

removed unnecessary test

[r26070]
parent 97b578ff
...@@ -2820,7 +2820,6 @@ static ir_node *transform_node_Div(ir_node *n) { ...@@ -2820,7 +2820,6 @@ static ir_node *transform_node_Div(ir_node *n) {
ir_node *a = get_Div_left(n); ir_node *a = get_Div_left(n);
ir_node *b = get_Div_right(n); ir_node *b = get_Div_right(n);
ir_node *value; ir_node *value;
tarval *tv;
if (is_Const(b) && is_const_Phi(a)) { if (is_Const(b) && is_const_Phi(a)) {
/* check for Div(Phi, Const) */ /* check for Div(Phi, Const) */
...@@ -2848,17 +2847,8 @@ static ir_node *transform_node_Div(ir_node *n) { ...@@ -2848,17 +2847,8 @@ static ir_node *transform_node_Div(ir_node *n) {
} }
value = n; value = n;
tv = value_of(n);
if (tv != tarval_bad) {
value = new_Const(tv);
DBG_OPT_CSTEVAL(n, value);
goto make_tuple;
} else {
ir_node *a = get_Div_left(n);
ir_node *b = get_Div_right(n);
const ir_node *dummy; const ir_node *dummy;
if (a == b && value_not_zero(a, &dummy)) { if (a == b && value_not_zero(a, &dummy)) {
/* BEWARE: we can optimize a/a to 1 only if this cannot cause a exception */ /* BEWARE: we can optimize a/a to 1 only if this cannot cause a exception */
value = new_Const(get_mode_one(mode)); value = new_Const(get_mode_one(mode));
...@@ -2878,7 +2868,6 @@ static ir_node *transform_node_Div(ir_node *n) { ...@@ -2878,7 +2868,6 @@ static ir_node *transform_node_Div(ir_node *n) {
/* Try architecture dependent optimization */ /* Try architecture dependent optimization */
value = arch_dep_replace_div_by_const(n); value = arch_dep_replace_div_by_const(n);
} }
}
if (value != n) { if (value != n) {
ir_node *mem, *blk; ir_node *mem, *blk;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment