This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine][SSE] Add MOVMSK support to SimplifyDemandedUseBits
ClosedPublic

Authored by RKSimon on Apr 27 2016, 1:09 PM.

Details

Summary

The MOVMSK instructions copies a vector elements' sign bits to the low bits of a scalar register and zeros the high bits.

This patch adds MOVMSK support to SimplifyDemandedUseBits so that its aware that the upper bits are known to be zero. It also removes the call to MOVMSK if none of the lower bits are actually required and just returns zero.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 55301.Apr 27 2016, 1:09 PM
RKSimon retitled this revision from to [InstCombine][SSE] Add MOVMSK support to SimplifyDemandedUseBits.
RKSimon updated this object.
RKSimon added reviewers: ab, andreadb, spatel.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: llvm-commits.
ab accepted this revision.Apr 27 2016, 1:33 PM
ab edited edge metadata.

LGTM

This revision is now accepted and ready to land.Apr 27 2016, 1:33 PM
This revision was automatically updated to reflect the committed changes.