This is an archive of the discontinued LLVM Phabricator instance.

Fixed a bug in VPERMT2 intrinsic
ClosedPublic

Authored by delena on Nov 23 2015, 11:30 PM.

Details

Summary

The second operand of VPERMT2* instruction is a shuffle mask. The type of this operand is always Integer.
The other operands may be or Integer (VPEMT2D) or Floating Point (VPERMT2PS).

I separated VPERMT2 from VPERMI2 , because VPERMI2 has the shuffle mask in the first operand. The type of first operand of VPERMI2 is not strictly defined since it is the SIMD register, which is source (int) and destination(fp or int) at the same time.

I did not add tests, since we already have tests for these intrinsics.

Diff Detail

Repository
rL LLVM

Event Timeline

delena updated this revision to Diff 41009.Nov 23 2015, 11:30 PM
delena retitled this revision from to Fixed a bug in VPERMT2 intrinsic.
delena updated this object.
delena added a reviewer: igorb.
delena set the repository for this revision to rL LLVM.
delena added a subscriber: llvm-commits.
delena updated this revision to Diff 41023.Nov 24 2015, 4:49 AM

Updated the test file.

igorb added inline comments.Nov 24 2015, 5:24 AM
lib/Target/X86/X86InstrAVX512.td
1204 ↗(On Diff #41023)

Is it possible to use this class for VPERM2I definition ?

avx512_perm_i<opc, OpcodeStr, OpNode, VTInfo.info512>
  
avx512_perm_t<opc, OpcodeStr, OpNode, VTInfo.info512, VTInfo.info512>
1218 ↗(On Diff #41023)

Did you meen OpNode _.RC:$src1, MaskVT.RC:$src2 ?

test/CodeGen/X86/avx512-intrinsics.ll
2 ↗(On Diff #41023)

Could you please commit updated test file as separate commit. Very difficult to identify changes from this patch.

This revision was automatically updated to reflect the committed changes.
delena marked an inline comment as done.
llvm/trunk/lib/Target/X86/X86InstrFragmentsSIMD.td