[PATCH] D63661: [SLPVectorizer] Operand reordering across multiple instructions.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 25 08:51:46 PDT 2019


RKSimon added inline comments.


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1181
+    static bool computeAPO(unsigned OpIdx, bool UserAPO, bool IsUserInverse) {
+      return (OpIdx == 0) ? UserAPO : (IsUserInverse) ? !UserAPO : UserAPO;
+    }
----------------
Tweak the brackets to make the ordering more readable:
```
return (OpIdx == 0) ? UserAPO : (IsUserInverse ? !UserAPO : UserAPO);
```


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2620
+         OpIdx != NumOperands; ++OpIdx) {
+      const auto OpVL = TmpSuperNode.getOperands().getVL(OpIdx);
+      buildTree_rec(OpVL, Depth + 1, TmpSuperNode.getEdge(OpIdx));
----------------
Don't use auto unless the type is obvious - there's a number of these in the patch that fixing.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D63661





More information about the llvm-commits mailing list