[PATCH] D20016: [X86][SSSE3] Lower vector CTLZ with PSHUFB lookups

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Sun May 15 19:47:33 PDT 2016


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

Much nicer, LGTM. Thanks for the added comments. See a nit pick about the style below, but submit with that addressed.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:1012-1020
@@ +1011,11 @@
+    // as we end up splitting the 256-bit vectors.
+    for (auto VT : { MVT::v32i8, MVT::v16i16 }) {
+      setOperationAction(ISD::CTLZ,            VT, Custom);
+    }
+
+    if (HasInt256) {
+      for (auto VT : { MVT::v8i32, MVT::v4i64 }) {
+        setOperationAction(ISD::CTLZ,          VT, Custom);
+      }
+    }
+
----------------
Please skip braces on clear single-line ifs and loops.


Repository:
  rL LLVM

http://reviews.llvm.org/D20016





More information about the llvm-commits mailing list