[SVE] Remove bad call to VectorType::getNumElements() from AMDGPU
authorChristopher Tetreault <ctetreau@quicinc.com>
Mon, 3 Aug 2020 22:42:13 +0000 (15:42 -0700)
committerChristopher Tetreault <ctetreau@quicinc.com>
Mon, 3 Aug 2020 22:56:10 +0000 (15:56 -0700)
Differential Revision: https://reviews.llvm.org/D85151

llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp

index 372c515..e186f66 100644 (file)
@@ -728,7 +728,7 @@ static Value *simplifyAMDGCNMemoryIntrinsicDemanded(InstCombiner &IC,
                                                     APInt DemandedElts,
                                                     int DMaskIdx = -1) {
 
-  auto *IIVTy = cast<VectorType>(II.getType());
+  auto *IIVTy = cast<FixedVectorType>(II.getType());
   unsigned VWidth = IIVTy->getNumElements();
   if (VWidth == 1)
     return nullptr;