diff options
| author | Dan Gohman <gohman@apple.com> | 2009-06-16 00:20:26 +0000 | 
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-06-16 00:20:26 +0000 | 
| commit | adfd42a3c85480eaf75fe30ef340ea3638681962 (patch) | |
| tree | 6e76f8c155016e837bed42a72345c0c55230124a /llvm/lib/Transforms | |
| parent | 853308d89db38f046a68e2b1bef294227888ff72 (diff) | |
| download | bcm5719-llvm-adfd42a3c85480eaf75fe30ef340ea3638681962.tar.gz bcm5719-llvm-adfd42a3c85480eaf75fe30ef340ea3638681962.zip | |
Use Type::getScalarType.
llvm-svn: 73451
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp index 7143c7be485..d89790c2921 100644 --- a/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -820,10 +820,8 @@ void SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *BCInst,            StoreVal = Constant::getNullValue(EltTy);  // 0.0, null, 0, <0,0>          } else {            // If EltTy is a vector type, get the element type. -          const Type *ValTy = EltTy; -          if (const VectorType *VTy = dyn_cast<VectorType>(ValTy)) -            ValTy = VTy->getElementType(); -           +          const Type *ValTy = EltTy->getScalarType(); +            // Construct an integer with the right value.            unsigned EltSize = TD->getTypeSizeInBits(ValTy);            APInt OneVal(EltSize, CI->getZExtValue()); | 

