[llvm-commits] [llvm] r172788 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Craig Topper craig.topper at gmail.com
Thu Jan 17 21:30:07 PST 2013


Author: ctopper
Date: Thu Jan 17 23:30:07 2013
New Revision: 172788

URL: http://llvm.org/viewvc/llvm-project?rev=172788&view=rev
Log:
Check for less than 0 in shuffle mask instead of -1. It's more consistent with other code related to shuffles and easier to implement in compiled code.

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp?rev=172788&r1=172787&r2=172788&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineVectorOps.cpp Thu Jan 17 23:30:07 2013
@@ -604,7 +604,7 @@
   // ShuffleVectorInst is equivalent to the original one.
   for (unsigned i = 0; i < VWidth; ++i) {
     int eltMask;
-    if (Mask[i] == -1) {
+    if (Mask[i] < 0) {
       // This element is an undef value.
       eltMask = -1;
     } else if (Mask[i] < (int)LHSWidth) {





More information about the llvm-commits mailing list