On Thu, 23 Mar 2017, Jakub Jelinek wrote: > > + if (vf != 1) > > + continue; > > + unlink_stmt_vdef (stmt); > > This is weird. AFAIK unlink_stmt_vdef just replaces the uses of the vdef > of that stmt with the vuse, but it still keeps the vdef (and vuse) around > on the stmt, typically it is used when you are removing that stmt, but > that is not the case here. So why are you doing it and not say removing the > vdef?
Maybe I misunderstand your question, but actually the statement is removed further below, when we break out of the switch: stmt = lhs ? gimple_build_assign (lhs, rhs) : gimple_build_nop (); gsi_replace (&gsi, stmt, false); The same tactic is already in place for cleaning up GOMP_SIMT_ORDERED_PRED. Thus, there's just one place that actually replaces statements; the body of the switch is only responsible for coming up with a suitable rhs and cleaning up vdefs for those statements where we know they would be present. Thanks. Alexander