[PATCH] [SLPVectorizer] Reorder operands of shufflevector if it can result in a vectorized code.

Arnold Schwaighofer aschwaighofer at apple.com
Wed Jan 7 09:51:34 PST 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:441
@@ -440,2 +440,3 @@
   bool isConsecutiveAccess(Value *A, Value *B);
 
+  void reorderAltShuffleOperands(ArrayRef<Value *> VL,
----------------
Why does that only apply to altShuffle operands shouldn't this work on any commutative binary vector operation?

================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1833
@@ -1819,2 +1832,3 @@
 }
 
+void BoUpSLP::reorderAltShuffleOperands(ArrayRef<Value *> VL,
----------------
Can you add some documentation to this function. Something like

// Reorder operands of commutative operations if the resulting vectors are consecutive loads.

http://reviews.llvm.org/D6677

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list