Page MenuHomePhabricator

[GlobalISel][X86] Support vector type G_MERGE_VALUES selection.
ClosedPublic

Authored by igorb on Jun 6 2017, 1:55 PM.

Details

Summary

Support vector type G_MERGE_VALUES selection. For now G_MERGE_VALUES marked as legal for any type, so nothing to do in legalizer.
Split from https://reviews.llvm.org/D33665

Diff Detail

Repository
rL LLVM

Event Timeline

igorb created this revision.Jun 6 2017, 1:55 PM
guyblank added inline comments.Jun 26 2017, 8:51 AM
lib/Target/X86/X86InstructionSelector.cpp
902 ↗(On Diff #101619)

why not use G_INSERT for the first element as well?

igorb added inline comments.Jun 27 2017, 12:17 AM
lib/Target/X86/X86InstructionSelector.cpp
902 ↗(On Diff #101619)

For the first element i need to create G_INSERT undef, val

%0(<8 x s32>) = IMPLICIT_DEF
%1(<4 x s32>) = COPY %xmm1
%2(<8 x s32>) = G_INSERT %0(<8 x s32>), %1(<4 x s32>), 0

That will be lowered to InsertSubreg. IMPLICIT_DEF is dead code and doesn't get RegClass constrain so MachineVerifier fail. In general case we have dead code elimination so this problem doesn't exist.

This revision is now accepted and ready to land.Jun 29 2017, 1:47 AM
igorb updated this revision to Diff 104610.Jun 29 2017, 2:41 AM
  • - rebase
This revision was automatically updated to reflect the committed changes.