Fix for 2005-08-12-rlwimi-crash.ll. Make allowance for masks being shifted to
authorJim Laskey <jlaskey@mac.com>
Fri, 12 Aug 2005 23:52:46 +0000 (23:52 +0000)
committerJim Laskey <jlaskey@mac.com>
Fri, 12 Aug 2005 23:52:46 +0000 (23:52 +0000)
zero.

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

lib/Target/PowerPC/PPCISelPattern.cpp

index 500333fb2966e0927042f774fe48eef6820895f0..9725c2c586cf68d6ec10ea395ab6a1895818038c 100644 (file)
@@ -640,7 +640,7 @@ static bool isRotateAndMask(unsigned Opcode, unsigned Shift, unsigned Mask,
   }
   
   // if the mask doesn't intersect any Indeterminant bits
-  if (!(Mask & Indeterminant)) {
+  if (Mask && !(Mask & Indeterminant)) {
     SH = Shift;
     // make sure the mask is still a mask (wrap arounds may not be)
     return isRunOfOnes(Mask, MB, ME);