Commit 77758e66 authored by Michael Beck's avatar Michael Beck
Browse files

use classify_Const()

[r15012]
parent 05e35241
......@@ -49,17 +49,6 @@ static ir_node *create_not(dbg_info *dbgi, ir_node *node)
return new_rd_Eor(dbgi, irg, block, node, one, lowered_mode);
}
static int is_Const_0(const ir_node *node)
{
tarval *tv;
if(!is_Const(node))
return 0;
tv = get_Const_tarval(node);
return tarval_is_null(tv);
}
static ir_node *lower_node(ir_node *node)
{
ir_graph *irg = current_ir_graph;
......@@ -140,7 +129,7 @@ static ir_node *lower_node(ir_node *node)
ir_node *right = get_Cmp_right(pred);
if(get_mode_size_bits(mode) < get_mode_size_bits(lowered_mode)
|| is_Const_0(right)) {
|| classify_Const(right) == CNST_NULL) {
int pnc = get_Proj_proj(node);
ir_node *res = NULL;
int need_not = 0;
......
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