aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorChristopher Tetreault <ctetreau@quicinc.com>2020-04-17 13:29:38 -0700
committerChristopher Tetreault <ctetreau@quicinc.com>2020-04-17 14:03:31 -0700
commitc858debebc1308e748de882c745e179b1a398fa0 (patch)
tree48f043ab87779ba0c61694f4ff29a7970e41f33a /llvm/lib/CodeGen/CodeGenPrepare.cpp
parentf8452ddfcc3336e42544a35481507f0b3bae423e (diff)
downloadllvm-c858debebc1308e748de882c745e179b1a398fa0.zip
llvm-c858debebc1308e748de882c745e179b1a398fa0.tar.gz
llvm-c858debebc1308e748de882c745e179b1a398fa0.tar.bz2
Remove asserting getters from base Type
Summary: Remove asserting vector getters from Type in preparation for the VectorType refactor. The existence of these functions complicates the refactor while adding little value. Reviewers: dexonsmith, sdesmalen, efriedma Reviewed By: efriedma Subscribers: cfe-commits, hiraditya, llvm-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D77278
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/CodeGen/CodeGenPrepare.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 5eb772d..d6a216f9 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -5262,7 +5262,7 @@ bool CodeGenPrepare::optimizeGatherScatterInst(Instruction *MemoryInst,
if (!RewriteGEP && Ops.size() == 2)
return false;
- unsigned NumElts = Ptr->getType()->getVectorNumElements();
+ unsigned NumElts = cast<VectorType>(Ptr->getType())->getNumElements();
IRBuilder<> Builder(MemoryInst);