[llvm-branch-commits] [llvm-branch] r202031 - last-stretch fix and simplifications; tests pass now :-)

Gabor Greif ggreif at gmail.com
Mon Feb 24 05:08:16 PST 2014


Author: ggreif
Date: Mon Feb 24 07:08:16 2014
New Revision: 202031

URL: http://llvm.org/viewvc/llvm-project?rev=202031&view=rev
Log:
last-stretch fix and simplifications; tests pass now :-)

Modified:
    llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp

Modified: llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp?rev=202031&r1=202030&r2=202031&view=diff
==============================================================================
--- llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp (original)
+++ llvm/branches/ggreif/waymark-64-new/lib/IR/Use.cpp Mon Feb 24 07:08:16 2014
@@ -105,12 +105,12 @@ const Use *Use::getImpliedUser<8>() cons
               Offset = (Offset << 2) | (Tag & 0x3);
               continue;
             default:
-              return Current + Offset;
+              return Current + Offset + (Offset == 0);
           }
         }
       }
 
-      default: Current += 3; continue;
+      default: Current += 3;
     }
   }
 }
@@ -186,17 +186,15 @@ Use *Use::initTags<8>(Use * const Start,
       new(Stop) Use(stopTag3);
       ++Done;
       Count = Done;
-      if (Start == Stop) return Start;
-      --Stop;
+      if (Start == Stop--) return Start;
       new(Stop) Use(skipStopTag3);
       ++Done;
       Count = Done;
-      if (Start == Stop) return Start;
-      --Stop;
+      if (Start == Stop--) return Start;
       new(Stop) Use(skip2StopTag3);
       ++Done;
-      Count = Done;
       if (Start == Stop) return Start;
+      Count = Done;
     } else {
       new(Stop) Use(Tag_t(zeroZeroDigitTag3 | (Count & 0x3)));
       Count >>= 2;





More information about the llvm-branch-commits mailing list