[llvm-commits] [llvm] r153458 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

Chris Lattner sabre at nondot.org
Mon Mar 26 12:13:57 PDT 2012


Author: lattner
Date: Mon Mar 26 14:13:57 2012
New Revision: 153458

URL: http://llvm.org/viewvc/llvm-project?rev=153458&view=rev
Log:
eliminate an unneeded branch, part of PR12357

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

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp?rev=153458&r1=153457&r2=153458&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp Mon Mar 26 14:13:57 2012
@@ -1362,13 +1362,8 @@
   // part of the value (e.g. byte 3) then it must be shifted right.  If from the
   // low part, it must be shifted left.
   unsigned DestByteNo = InputByteNo + OverallLeftShift;
-  if (InputByteNo < ByteValues.size()/2) {
-    if (ByteValues.size()-1-DestByteNo != InputByteNo)
-      return true;
-  } else {
-    if (ByteValues.size()-1-DestByteNo != InputByteNo)
-      return true;
-  }
+  if (ByteValues.size()-1-DestByteNo != InputByteNo)
+    return true;
   
   // If the destination byte value is already defined, the values are or'd
   // together, which isn't a bswap (unless it's an or of the same bits).





More information about the llvm-commits mailing list