[PATCH] D48236: [IR] move shuffle mask queries from TTI to ShuffleVectorInst

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 17 07:05:21 PDT 2018


spatel updated this revision to Diff 151644.
spatel marked 7 inline comments as done.
spatel added a comment.

Patch updated:

1. Fixed undef checks to be "x == -1" rather than "x < 0".
2. Added assertions for inputs and logic.
3. Added more unit tests (the last group is based on the mask examples that I added to the header file code comments...would be extra embarrassing to get those wrong!).
4. Reduced confusing comment for transpose (and restated the canonical TRN1 / TRN2 examples for clarity).
5. Changed all 'unsigned' types to 'int' so we don't have to cast (this is always an annoyance with mask values).
6. Changed variable names and added locals to try to make the logic clearer and more uniform.


https://reviews.llvm.org/D48236

Files:
  include/llvm/IR/Instructions.h
  lib/Analysis/TargetTransformInfo.cpp
  lib/IR/Instructions.cpp
  unittests/IR/InstructionsTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48236.151644.patch
Type: text/x-patch
Size: 23988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180617/5b1e6fa5/attachment.bin>


More information about the llvm-commits mailing list