Fixed initialization of option tables
[libfirm] / ir / opt / scalar_replace.c
index ea445a3..dd49297 100644 (file)
 #include "config.h"
 #endif
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
+#include "iroptimize.h"
 #include "scalar_replace.h"
 #include "irflag_t.h"
 #include "irouts.h"
@@ -433,7 +432,7 @@ static unsigned allocate_value_numbers(pset *sels, ir_entity *ent, unsigned vnum
       set_insert(pathes, key, PATH_SIZE(key), path_hash(key));
 
       SET_VNUM(sel, key->vnum);
-      ARR_EXTO(ir_mode *, *modes, (key->vnum + 15) & ~15);
+      ARR_EXTO(ir_mode *, *modes, (int)((key->vnum + 15) & ~15));
 
       (*modes)[key->vnum] = get_type_mode(get_entity_type(get_Sel_entity(sel)));
 
@@ -707,10 +706,10 @@ static void fix_loads(env_t *env)
            mem = get_Load_mem(load);
 
     turn_into_tuple(load, pn_Load_max);
-    set_Tuple_pred(load, pn_Load_M,        mem);
-    set_Tuple_pred(load, pn_Load_res,      val);
-    set_Tuple_pred(load, pn_Load_X_except, new_r_Jmp(current_ir_graph, block));
-    set_Tuple_pred(load, pn_Load_X_except, new_Bad());
+    set_Tuple_pred(load, pn_Load_M,         mem);
+    set_Tuple_pred(load, pn_Load_res,       val);
+    set_Tuple_pred(load, pn_Load_X_regular, new_r_Jmp(current_ir_graph, block));
+    set_Tuple_pred(load, pn_Load_X_except,  new_Bad());
   }
 }