[PATCH] D30200: [SLP] Fix for PR31880: shuffle and vectorize repeated scalar ops on extracted elements

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 07:19:53 PDT 2017


RKSimon added a comment.

One minor comment, but other than that it looks ok - @mkuper?



================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:219
+    unsigned IntIdx = Idx->getValue().getZExtValue();
+    if (IntIdx >= Size)
+      continue;
----------------
You could merge this and the isNegative test above into a single bounds test by using:
```
if (Idx->getValue().uge(Size))
      continue;
unsigned IntIdx = Idx->getValue().getZExtValue();
```


https://reviews.llvm.org/D30200





More information about the llvm-commits mailing list