This is an archive of the discontinued LLVM Phabricator instance.

[X86] Fix bug in new build_vector v4x32 lowering
ClosedPublic

Authored by mkuper on Nov 23 2014, 3:43 AM.

Details

Summary

The new build_vector lowering misses a case where:

  1. A single extracted element is used twice.
  2. The lower of the two non-zero indexes should be preserved, and the higher should be used for the dest mask.

This causes a crash, since the source value for the insertps ends-up uninitialized.

Diff Detail

Repository
rL LLVM

Event Timeline

mkuper updated this revision to Diff 16536.Nov 23 2014, 3:43 AM
mkuper retitled this revision from to [X86] Fix bug in new build_vector v4x32 lowering.
mkuper updated this object.
mkuper edited the test plan for this revision. (Show Details)
mkuper added reviewers: andreadb, qcolombet.
mkuper added a subscriber: Unknown Object (MLST).
andreadb accepted this revision.Nov 23 2014, 4:02 AM
andreadb edited edge metadata.

Hi Michael,

Thanks for fixing this bug.
The patch LGTM thanks!

This revision is now accepted and ready to land.Nov 23 2014, 4:02 AM
mkuper closed this revision.Nov 23 2014, 5:09 AM
mkuper updated this revision to Diff 16537.

Closed by commit rL222635 (authored by @mkuper).