[PATCH] D16652: [X86][SSE] Find source of the inserted element of INSERTPS

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 31 09:15:24 PST 2016


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

LGTM. One idealistic shuffle mask suggestion. :)


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:24023
@@ +24022,3 @@
+      int M = TargetMask1[SrcIdx];
+      if (M < 0) { 
+        // Zero/UNDEF insertion - zero out element and remove dependency.
----------------
I know this is currently inconsistent, but how about adding a helper function that does something like:
  bool isZeroOrUndefMaskElt(int Elt) {
    if (Elt == SM_SentinelUndef || Elt == SM_SentinelZero)
      return true;
    return false;
  }


Repository:
  rL LLVM

http://reviews.llvm.org/D16652





More information about the llvm-commits mailing list