big endian systems shift by bits too, hopefully this will fix the ppc
authorChris Lattner <sabre@nondot.org>
Mon, 21 Sep 2009 17:55:47 +0000 (17:55 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Sep 2009 17:55:47 +0000 (17:55 +0000)
bootstrap problems.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82464 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/GVN.cpp

index b549e8031771fb660677ef1ce7d4d0991a7a234b..a2d210a36f2a737d7aec3b5a497a6ed6e6bd64f3 100644 (file)
@@ -1202,7 +1202,7 @@ static Value *GetStoreValueForLoad(Value *SrcVal, unsigned Offset,
   if (TD.isLittleEndian()) {
     ShiftAmt = Offset*8;
   } else {
-    ShiftAmt = StoreSize-LoadSize-Offset;
+    ShiftAmt = (StoreSize-LoadSize-Offset)*8;
   }
   
   if (ShiftAmt)