+ ir_mode *mode, *mode_c1 = get_irn_mode(c1), *mode_c2 = get_irn_mode(c2);
+
+ /* It might happen, that c1 and c2 have different modes, for instance Is and Iu.
+ * Handle this here.
+ */
+ if (mode_c1 != mode_c2) {
+ if (mode_is_int(mode_c1) && mode_is_int(mode_c2)) {
+ /* get the bigger one */
+ if (get_mode_size_bits(mode_c1) > get_mode_size_bits(mode_c2))
+ c2 = new_r_Conv(current_ir_graph, block, c2, mode_c1);
+ else if (get_mode_size_bits(mode_c1) < get_mode_size_bits(mode_c2))
+ c1 = new_r_Conv(current_ir_graph, block, c1, mode_c2);
+ else {
+ /* Try to cast the real const */
+ if (c_c1 == REAL_CONSTANT)
+ c1 = new_r_Conv(current_ir_graph, block, c1, mode_c2);
+ else
+ c2 = new_r_Conv(current_ir_graph, block, c2, mode_c1);
+ }
+ }
+ }