Fix a bug in my previous checkin
authorChris Lattner <sabre@nondot.org>
Fri, 26 Aug 2005 17:18:44 +0000 (17:18 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 26 Aug 2005 17:18:44 +0000 (17:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23082 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/IA64/IA64ISelPattern.cpp
lib/Target/X86/X86ISelPattern.cpp

index 32aa94ac58b3d2a68b568fa2e3faf16e92f51830..0d3bc1512fc58ae25ce897cbd8814d73e4bc307f 100644 (file)
@@ -1976,7 +1976,7 @@ pC = pA OR pB
       }
     } else if(ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Address)) {
       unsigned CPIdx = BB->getParent()->getConstantPool()->
-         getConstantPoolIndex(cast<ConstantPoolSDNode>(N)->get());
+                           getConstantPoolIndex(CP->get());
       Select(Chain);
       IA64Lowering.restoreGP(BB);
       unsigned dummy = MakeReg(MVT::i64);
index 9f602418aba3916c913b99d074fd9be6fe7eafa5..a874404f7eb7acb56db44dcfa60e0b20f98326d3 100644 (file)
@@ -3374,7 +3374,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
         assert(cast<VTSDNode>(Node->getOperand(3))->getVT() == MVT::f32 &&
                "Bad EXTLOAD!");
         unsigned CPIdx = BB->getParent()->getConstantPool()->
-          getConstantPoolIndex(cast<ConstantPoolSDNode>(N)->get());
+          getConstantPoolIndex(CP->get());
 
         addConstantPoolReference(BuildMI(BB, X86::FLD32m, 4, Result), CPIdx);
         return Result;