View | Details | Return to bug 34678 | Differences between
and this patch

Collapse All | Expand All

(-)gcc/gimple-low.c (-1 / +33 lines)
Lines 234-239 lower_omp_directive (gimple_stmt_iterato Link Here
234
  gsi_next (gsi);
234
  gsi_next (gsi);
235
}
235
}
236
236
237
/* Build __asm__ volatile ("" : "=g" (op) : "0" (op)).  */
238
239
static gasm *
240
gimple_build_barrier (tree op)
241
{
242
  vec<tree, va_gc> *inputs = NULL, *outputs = NULL;
243
  vec_safe_push (inputs,
244
		 build_tree_list (build_tree_list
245
				    (NULL_TREE, build_string (2, "0")), op));
246
  vec_safe_push (outputs,
247
		 build_tree_list (build_tree_list
248
				    (NULL_TREE, build_string (3, "=g")), op));
249
  gasm *fixup = gimple_build_asm_vec ("", inputs, outputs, NULL, NULL);
250
  gimple_asm_set_volatile (fixup, true);
251
  return fixup;
252
}
237
253
238
/* Lower statement GSI.  DATA is passed through the recursion.  We try to
254
/* Lower statement GSI.  DATA is passed through the recursion.  We try to
239
   track the fallthruness of statements and get rid of unreachable return
255
   track the fallthruness of statements and get rid of unreachable return
Lines 322-330 lower_stmt (gimple_stmt_iterator *gsi, s Link Here
322
	gsi_next (gsi);
338
	gsi_next (gsi);
323
      return;
339
      return;
324
340
341
    case GIMPLE_ASSIGN:
342
      if (flag_rounding_math
343
	  && !gimple_assign_single_p (stmt))
344
	{
345
	  for (unsigned i = 1; i < gimple_num_ops (stmt); ++i)
346
	    {
347
	      tree op = gimple_op (stmt, i);
348
	      if (!CONSTANT_CLASS_P (op)
349
		  && HONOR_SIGN_DEPENDENT_ROUNDING (op))
350
		{
351
		  gasm *fixup = gimple_build_barrier (op);
352
		  gsi_insert_before (gsi, fixup, GSI_SAME_STMT);
353
		}
354
	    }
355
	}
356
      break;
357
325
    case GIMPLE_NOP:
358
    case GIMPLE_NOP:
326
    case GIMPLE_ASM:
359
    case GIMPLE_ASM:
327
    case GIMPLE_ASSIGN:
328
    case GIMPLE_PREDICT:
360
    case GIMPLE_PREDICT:
329
    case GIMPLE_LABEL:
361
    case GIMPLE_LABEL:
330
    case GIMPLE_EH_MUST_NOT_THROW:
362
    case GIMPLE_EH_MUST_NOT_THROW:

Return to bug 34678