stmt = gsi_stmt (gsi);
/* Ignore labels. */
- if (gimple_code (stmt) == GIMPLE_LABEL)
+ if (gimple_code (stmt) == GIMPLE_LABEL || is_gimple_debug (stmt))
continue;
/* Check for a call. */
if (gimple_code (stmt) == GIMPLE_RETURN)
break;
+ if (is_gimple_debug (stmt))
+ continue;
+
if (gimple_code (stmt) != GIMPLE_ASSIGN)
return;