Fix a bug in my previous checkin
llvm-svn: 23082
diff --git a/llvm/lib/Target/IA64/IA64ISelPattern.cpp b/llvm/lib/Target/IA64/IA64ISelPattern.cpp
index 32aa94a..0d3bc15 100644
--- a/llvm/lib/Target/IA64/IA64ISelPattern.cpp
+++ b/llvm/lib/Target/IA64/IA64ISelPattern.cpp
@@ -1976,7 +1976,7 @@
}
} 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);
diff --git a/llvm/lib/Target/X86/X86ISelPattern.cpp b/llvm/lib/Target/X86/X86ISelPattern.cpp
index 9f60241..a874404 100644
--- a/llvm/lib/Target/X86/X86ISelPattern.cpp
+++ b/llvm/lib/Target/X86/X86ISelPattern.cpp
@@ -3374,7 +3374,7 @@
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;