[PATCH] D12334: [ARM] Do not use vtrn for vectorshuffle if the order is reversed
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 18:33:44 PDT 2015
ab added a subscriber: ab.
ab accepted this revision.
ab added a reviewer: ab.
ab added a comment.
This revision is now accepted and ready to land.
LGTM with the additional suggested testcase (if it does make sense), thanks!
I'm surprised we didn't see this earlier, I guess it was exposed by r240118?
================
Comment at: lib/Target/ARM/ARMISelLowering.cpp:5059
@@ -5050,3 +5058,3 @@
for (unsigned i = 0; i < M.size(); i += NumElts) {
WhichResult = M[i] == 0 ? 0 : 1;
for (unsigned j = 0; j < NumElts; j += 2) {
----------------
Looking at this again, I realize: isn't this a tad too conservative? What happens when you have:
```
<-1, 4, 2, 6, 1, 5, 3, 7>
```
More importantly: could this break, say with:
```
<-1, 5, 3, 7, 1, 5, 3, 7>
```
which isn't a vtrn, but looks like it will match? After this patch the '>=' should catch this, I think. If so, could you add a testcase?
http://reviews.llvm.org/D12334
More information about the llvm-commits
mailing list