Page MenuHomePhabricator

[SLP] Fix for PR30626: Compiler crash inside SLP Vectorizer.

Authored by ABataev on Oct 17 2016, 5:55 AM.



After successfull horizontal reduction vectorization attempt for PHI node vectorizer tries to update root binary op by combining vectorized tree and the ReductionPHI node. But during vectorization this ReductionPHI can be vectorized itself and replaced by the undef value, while the instruction itself is marked for deletion. This 'marked for deletion' PHI node then can be used in new binary operation, causing "Use still stuck around after Def is destroyed" crash upon PHI node deletion.

Also the test is fixed to make it perform actual testing.

Diff Detail


Event Timeline

ABataev updated this revision to Diff 74832.Oct 17 2016, 5:55 AM
ABataev retitled this revision from to [SLP] Fix for PR30626: Compiler crash inside SLP Vectorizer..
ABataev updated this object.
ABataev added reviewers: mkuper, hfinkel, mzolotukhin.
ABataev set the repository for this revision to rL LLVM.
ABataev added subscribers: RKSimon, spatel, llvm-commits.
ABataev updated this revision to Diff 74980.Oct 18 2016, 4:18 AM
ABataev removed rL LLVM as the repository for this revision.

Fixed a test that was not vectorized

hfinkel accepted this revision.Oct 26 2016, 3:03 PM
hfinkel edited edge metadata.


4065 ↗(On Diff #74980)

Please add a comment here (i.e. from this patch description), explaining why this is a WeakVH.

This revision is now accepted and ready to land.Oct 26 2016, 3:03 PM
This revision was automatically updated to reflect the committed changes.