diff --git a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp index 4a39d9e4481c..46778ccb3482 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUHSAMetadataStreamer.cpp @@ -153,7 +153,7 @@ ValueType MetadataStreamerV2::getValueType(Type *Ty, StringRef TypeName) const { case Type::PointerTyID: return getValueType(Ty->getPointerElementType(), TypeName); case Type::VectorTyID: - return getValueType(Ty->getVectorElementType(), TypeName); + return getValueType(cast(Ty)->getElementType(), TypeName); default: return ValueType::Struct; } @@ -188,7 +188,7 @@ std::string MetadataStreamerV2::getTypeName(Type *Ty, bool Signed) const { case Type::VectorTyID: { auto VecTy = cast(Ty); auto ElTy = VecTy->getElementType(); - auto NumElements = VecTy->getVectorNumElements(); + auto NumElements = VecTy->getNumElements(); return (Twine(getTypeName(ElTy, Signed)) + Twine(NumElements)).str(); } default: @@ -600,7 +600,7 @@ StringRef MetadataStreamerV3::getValueType(Type *Ty, StringRef TypeName) const { case Type::PointerTyID: return getValueType(Ty->getPointerElementType(), TypeName); case Type::VectorTyID: - return getValueType(Ty->getVectorElementType(), TypeName); + return getValueType(cast(Ty)->getElementType(), TypeName); default: return "struct"; } @@ -635,7 +635,7 @@ std::string MetadataStreamerV3::getTypeName(Type *Ty, bool Signed) const { case Type::VectorTyID: { auto VecTy = cast(Ty); auto ElTy = VecTy->getElementType(); - auto NumElements = VecTy->getVectorNumElements(); + auto NumElements = VecTy->getNumElements(); return (Twine(getTypeName(ElTy, Signed)) + Twine(NumElements)).str(); } default: diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp index b7baecdec6b6..df6ae4a4b777 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp @@ -152,7 +152,7 @@ bool AMDGPULowerKernelArguments::runOnFunction(Function &F) { } if (IsV3 && Size >= 32) { - V4Ty = VectorType::get(VT->getVectorElementType(), 4); + V4Ty = VectorType::get(VT->getElementType(), 4); // Use the hack that clang uses to avoid SelectionDAG ruining v3 loads AdjustedArgTy = V4Ty; }