This is an archive of the discontinued LLVM Phabricator instance.

[X86] Rewrite the zero vector checks in lowerV2X128VectorShuffle to use the Zeroable APInt
ClosedPublic

Authored by craig.topper on Sep 16 2017, 1:40 PM.

Details

Summary

We already have zeroable bits in an APInt. We might as well use that instead of checking for an all zero BUILD_VECTOR.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Sep 16 2017, 1:40 PM
RKSimon added inline comments.Sep 23 2017, 4:20 AM
lib/Target/X86/X86ISelLowering.cpp
12212 ↗(On Diff #115546)

These look superfluous

12222 ↗(On Diff #115546)

Use ternary operators?

PermMask |= IsLowZero ? 0x08 : WidenedMask[0];
PermMask |= IsHighZero ? 0x80 : WidenedMask[1];

Address review comments

RKSimon accepted this revision.Sep 27 2017, 2:43 AM

LGTM

This revision is now accepted and ready to land.Sep 27 2017, 2:43 AM
This revision was automatically updated to reflect the committed changes.