This is an archive of the discontinued LLVM Phabricator instance.

[AVX512][MS-compatability][llvm] Amending vpmultishiftqb
ClosedPublic

Authored by coby on Nov 2 2016, 12:37 PM.

Details

Summary

The 'vpmultishiftqb' instruction was implemented falsely, this patch amend it.
More specifically - (MS dialect) broadcasting variants were implemented falsely.

Differential Revision: https://reviews.llvm.org/D26257

Diff Detail

Repository
rL LLVM

Event Timeline

coby updated this revision to Diff 76768.Nov 2 2016, 12:37 PM
coby retitled this revision from to [AVX512][llvm] Amending vpmultishiftqb.
coby updated this object.
coby set the repository for this revision to rL LLVM.
coby added a subscriber: llvm-commits.
coby updated this object.Nov 2 2016, 12:41 PM
craig.topper edited edge metadata.Nov 3 2016, 3:25 PM

Can you please clarify what the perceived problem is? The encodings already match your test case before this change and the result type change doesn't make sense given that the instruction really does write bytes.

include/llvm/IR/IntrinsicsX86.td
2136

I think the result type should still be byte elements to match the number of elements in the write mask.

coby added a comment.Nov 3 2016, 4:39 PM

Can you please clarify what the perceived problem is? The encodings already match your test case before this change and the result type change doesn't make sense given that the instruction really does write bytes.

Simple.

  1. While the inst. does accesses/writes bytes, it defined to operate upon qword elements, and to 'emit' qword elements (each 8 selected 'unaligned' bytes is assembled as one 'aligned' qword). So, if nothing else, it should be well represented.
  2. consider the following case :

vpmultishiftqb xmm1, xmm2, [rax]{1to2}
would it fly?

include/llvm/IR/IntrinsicsX86.td
2136
  1. As far as practical matters is to be concerned - the 'raw' result will remain the same.
  2. One may expect to be supplied with a result which is partitioned as it spec'd to be, i.e. at a qword granularity. hence, I think it should remain as such.
delena added inline comments.Nov 4 2016, 10:22 AM
include/llvm/IR/IntrinsicsX86.td
2136

Craig is right. The result is a vector of byte elements and the mask type should correspond the result. Please fix.

We also need AutoUpgrade support from the old signature with the old argument type to the new signature with the new argument type.

coby updated this revision to Diff 78658.Nov 20 2016, 5:13 AM
coby retitled this revision from [AVX512][llvm] Amending vpmultishiftqb to [AVX512][MS-compatability][llvm] Amending vpmultishiftqb.
coby updated this object.
coby edited edge metadata.
  1. congregate patch to its agreed-upon set of changes
  2. emphasize issue via a dedicated test
delena accepted this revision.Nov 20 2016, 5:48 AM
delena edited edge metadata.
This revision is now accepted and ready to land.Nov 20 2016, 5:48 AM
coby updated this object.Nov 20 2016, 9:21 AM
coby edited edge metadata.
This revision was automatically updated to reflect the committed changes.