aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-04-04 22:28:35 +0000
committerChris Lattner <sabre@nondot.org>2006-04-04 22:28:35 +0000
commit098e699f21a532d37b1ad44bb1bc24a87b3f9962 (patch)
tree61d778d3274262dcacd2885e4afd6cd9dfd9a8d0
parentff65e38aaff8e373c52b874afc93eba181289d68 (diff)
Fix some broken logic that would cause us to codegen {2147483647,2147483647,2147483647,2147483647} as 'vspltisb v0, -1'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27413 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index b27f5959db..f1325e8387 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -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;
}