[PATCH] D46957: [x86] Lower some trunc + shuffle patterns to vpmov[q|d][b|w]
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 24 06:39:42 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:9418
+ // These should refer to the second vectors elements
+ while (I < N) {
+ if (Mask[I] != Size + I * delta)
----------------
RKSimon wrote:
> Can you use the shuffle mask helpers for any/all of these - isUndefOrInRange etc?
If you tweak isSequentialOrUndefInRange to take an increment argument (default = 1) then you could remove this loop.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:9429
+ while (I < Size) {
+ if (isInRange(Mask[I], TruncatedVectorStart, TruncatedVectorStart + Size))
+ return false;
----------------
GBuella wrote:
> RKSimon wrote:
> > Why can't you permit UNDEFs in the shuffle mask?
> I do permit undef here. The condition of the branch is what I don't permit.
Then why don't you use isUndefOrZeroOrInRange()?
```
if (!isUndefOrZeroOrInRange(Mask.slice(Split, Size), TruncatedVectorStart, TruncatedVectorStart + Size))
return false;
```
https://reviews.llvm.org/D46957
More information about the llvm-commits
mailing list