[PATCH] D60375: [X86] combineVectorTruncationWithPACKUS - remove split/concatenation of mask

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 18 08:52:22 PDT 2019


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:39199
 
 /// Truncate using ISD::AND mask and X86ISD::PACKUS.
 static SDValue combineVectorTruncationWithPACKUS(SDNode *N, const SDLoc &DL,
----------------
It would be good to add an example in the comment here or within the function. Something like:
trunc <8 x i32> X to <8 x i16> --> 
MaskX = X & 0xffff (clear high bits to prevent saturation)
packus (extract_subv MaskX, 0), (extract_subv MaskX, 1)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60375/new/

https://reviews.llvm.org/D60375





More information about the llvm-commits mailing list