LBRX no longer has an explicit SrcValueSDNode operand, so the type
authorDan Gohman <gohman@apple.com>
Sun, 27 Sep 2009 23:17:47 +0000 (23:17 +0000)
committerDan Gohman <gohman@apple.com>
Sun, 27 Sep 2009 23:17:47 +0000 (23:17 +0000)
operand is now at index 2, rather than 3. This fixes the
"Invalid child # of SDNode!" failures on PowerPC.

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

lib/Target/PowerPC/PPCISelLowering.cpp

index 63d6665953f2a0162149479dc31d9dfdd5a05f7f..3920b3815098dd211d286cb0df80f3e275f559f2 100644 (file)
@@ -5116,7 +5116,7 @@ void PPCTargetLowering::computeMaskedBitsForTargetNode(const SDValue Op,
   default: break;
   case PPCISD::LBRX: {
     // lhbrx is known to have the top bits cleared out.
-    if (cast<VTSDNode>(Op.getOperand(3))->getVT() == MVT::i16)
+    if (cast<VTSDNode>(Op.getOperand(2))->getVT() == MVT::i16)
       KnownZero = 0xFFFF0000;
     break;
   }