[PATCH] D27466: [SLP] Fix sign-extends for type-shrinking

Michael Kuperstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 11:46:32 PST 2016


mkuper accepted this revision.
mkuper added a comment.
This revision is now accepted and ready to land.

LGTM with a couple of nits.



================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1936
+      auto *MinTy = IntegerType::get(F->getContext(), MinBWs[ScalarRoot].first);
+      auto ExTy =
+          MinBWs[ScalarRoot].second ? Instruction::SExt : Instruction::ZExt;
----------------
Could you rename this? ExTy makes it look like a type (yes, it's the "type of the extensions", but...)


================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:3542
+    // IsSigned is set to True.
+    for (auto *Root : TreeRoot) {
+      IsSigned = !isSignBitKnownZero(Root);
----------------
Can you use all_of?


https://reviews.llvm.org/D27466





More information about the llvm-commits mailing list