[PATCH] D18307: [X86][SSE] Add MULHS/MULHU custom lowering for i8 vectors

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 14:08:02 PDT 2016


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

Hi Simon,

LGTM. Couple of nits inlined.

Cheers,
-Quentin


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:19094
@@ +19093,3 @@
+      // Before using ymm PACKUS we need to permute inputs to lower/upper xmm.
+      const int LoMask[] = {0,  1,  2,  3,  4,  5,  6,  7,
+                            16, 17, 18, 19, 20, 21, 22, 23};
----------------
Add that unlike the smaller PACKUS, the ymm variant interleaves the 128 bits of the both sources.
Without that in mind, the shuffle does not make sense, whereas it is definitely required :).

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:19117
@@ +19116,3 @@
+
+  // Extract the lo parts and zero/sign extend to i16
+  SDValue ALo, BLo;
----------------
Period.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:19133
@@ +19132,3 @@
+
+  // Extract the hi parts and zero/sign extend to i16
+  SDValue AHi, BHi;
----------------
Period.


Repository:
  rL LLVM

http://reviews.llvm.org/D18307





More information about the llvm-commits mailing list