[PATCH] D42258: [X86][SSE] Aggressively use PMADDWD for v4i32 multiplies with 17 or more leading zeros

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 19:48:11 PST 2018


craig.topper added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:32606
+  if (Subtarget.getProcFamily() != X86Subtarget::IntelKNL) {
+    APInt Mask17 = APInt::getHighBitsSet(32, 17);
+    if (VT == MVT::v4i32 || (VT == MVT::v8i32 && Subtarget.hasAVX2()) ||
----------------
Move the APInt inside the second if? Maybe combine the two ifs?


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:32607
+    APInt Mask17 = APInt::getHighBitsSet(32, 17);
+    if (VT == MVT::v4i32 || (VT == MVT::v8i32 && Subtarget.hasAVX2()) ||
+        (VT == MVT::v16i32 && Subtarget.hasBWI())) {
----------------
Do you need an SSE2 check on the v4i32?


Repository:
  rL LLVM

https://reviews.llvm.org/D42258





More information about the llvm-commits mailing list