Fix some broken logic that would cause us to codegen {2147483647,2147483647,214748364...
authorChris Lattner <sabre@nondot.org>
Tue, 4 Apr 2006 22:28:35 +0000 (22:28 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 4 Apr 2006 22:28:35 +0000 (22:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27413 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCISelLowering.cpp

index b27f5959db32c5651af866374d8942c5c7e8ff55..f1325e8387c1ed97ab760405e3f3b26472b36177 100644 (file)
@@ -353,8 +353,8 @@ bool PPC::isVecSplatImm(SDNode *N, unsigned ByteSize, char *Val) {
     ValSizeInBytes >>= 1;
     
     // If the top half equals the bottom half, we're still ok.
-    if (((Value >> (ValSizeInBytes*8)) & ((8 << ValSizeInBytes)-1)) !=
-         (Value                        & ((8 << ValSizeInBytes)-1)))
+    if (((Value >> (ValSizeInBytes*8)) & (1 << (8*ValSizeInBytes)-1)) !=
+         (Value                        & (1 << (8*ValSizeInBytes)-1)))
       return false;
   }