This is an archive of the discontinued LLVM Phabricator instance.

[X86] Directly emit X86ISD::BLENDV instead of VSELECT in a few places that were emitting sign bit tests.
ClosedPublic

Authored by craig.topper on Jul 8 2020, 6:56 PM.

Details

Summary

Technically a VSELECT expects a vector of all 1s or 0s elements
for its condition. But we aren't guaranteeing that the sign bit
and the non sign bits match in these locations. So we should use
BLENDV which is more relaxed.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 8 2020, 6:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 8 2020, 6:56 PM
Herald added a subscriber: hiraditya. · View Herald Transcript

Full patch. Previous was just the difference from running clang-format

RKSimon accepted this revision.Jul 9 2020, 12:44 AM

LGTM

This revision is now accepted and ready to land.Jul 9 2020, 12:44 AM
This revision was automatically updated to reflect the committed changes.