Page MenuHomePhabricator

AVX-512: INSERT_SUBVECTOR optimization for i1 vectors
ClosedPublic

Authored by delena on Nov 19 2015, 5:30 AM.

Details

Summary

INSERT_SUBVECTOR for i1 vectors is implemented with shifts.
CONCAT_VECTORS generates INSERT_SUBVECTOR nodes.

Diff Detail

Repository
rL LLVM

Event Timeline

delena updated this revision to Diff 40633.Nov 19 2015, 5:30 AM
delena retitled this revision from to AVX-512: INSERT_SUBVECTOR optimization for i1 vectors.
delena updated this object.
delena added reviewers: igorb, mbodart.
delena set the repository for this revision to rL LLVM.
delena added a subscriber: llvm-commits.
mbodart edited edge metadata.Nov 20 2015, 12:33 PM

Hi Elena,

In general the changes LGTM, I had just a couple minor questions/comments.

  • mitch
lib/Target/X86/X86ISelLowering.cpp
6571 ↗(On Diff #40633)

A simple one line comment here would be useful. something like:

// Specialize the cases when all, or all but one, of the operands are undef.

lib/Target/X86/X86InstrAVX512.td
2422 ↗(On Diff #40633)

What are the consequences of removing the HasVLX predicate?

Was it unnecessary in the first place, perhaps because the mere presence
of the VK* register classes already implied it?

test/CodeGen/X86/avx512-skx-insert-subvec.ll
1 ↗(On Diff #40633)

Isn't -march=x86-64 already implied by the triple?

In one of my earlier change sets, Michael Kuperstein recommended using -mattr instead of -mcpu as a general testing guideline. I don't have a strong opinion either way, but it's something to consider.

Finally, can you add some tests for knl (i.e., vanilla avx512f)?

This revision was automatically updated to reflect the committed changes.

Mitch,

Thank you for the review. I applied your comments.

What are the consequences of removing the HasVLX predicate?

VK legal types cover predicates. (If VK4 of VK2 are legal, the VLX is on)

> Finally, can you add some tests for knl
It is not "interesting", illegal types will be promoted or split. The code will be ugly.

  • Elena