http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56612
Bug #: 56612 Summary: basic-block vectorization does not replace all scalar uses Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: rgue...@gcc.gnu.org When vectorizing stmts in a basic-block we do not verify that the SLP instance covers all uses of the definitions the stmts in the SLP tree. This can easily result in both the scalar and vectorized set of stmts being kept live and executed. See PR56608 for an example (trivial re-use of the SLP roots stored values).