diff options
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 6fd8ff8b563..01aedda6353 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -283,10 +283,10 @@ Constant *llvm::ConstantFoldLoadThroughGEPConstantExpr(Constant *C, C = UndefValue::get(ATy->getElementType()); else return 0; - } else if (const PackedType *PTy = dyn_cast<PackedType>(*I)) { + } else if (const VectorType *PTy = dyn_cast<VectorType>(*I)) { if (CI->getZExtValue() >= PTy->getNumElements()) return 0; - if (ConstantPacked *CP = dyn_cast<ConstantPacked>(C)) + if (ConstantVector *CP = dyn_cast<ConstantVector>(C)) C = CP->getOperand(CI->getZExtValue()); else if (isa<ConstantAggregateZero>(C)) C = Constant::getNullValue(PTy->getElementType()); |