diff options
author | Christopher Tetreault <ctetreau@quicinc.com> | 2020-04-14 13:30:18 -0700 |
---|---|---|
committer | Christopher Tetreault <ctetreau@quicinc.com> | 2020-04-14 13:44:10 -0700 |
commit | 5f07dcd23c2dac5b34115df07d3ae629c35c6eb3 (patch) | |
tree | 5824002836251d2b069662a33096e285cb8c55da /llvm/lib/IR/ConstantFold.cpp | |
parent | 9d2d6e71f096ad43b178c576adf94fc922034c73 (diff) | |
download | llvm-5f07dcd23c2dac5b34115df07d3ae629c35c6eb3.zip llvm-5f07dcd23c2dac5b34115df07d3ae629c35c6eb3.tar.gz llvm-5f07dcd23c2dac5b34115df07d3ae629c35c6eb3.tar.bz2 |
[SVE] Remove calls to getBitWidth from IR
Reviewers: efriedma, sdesmalen, RKSimon, majnemer
Reviewed By: majnemer
Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D77897
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index de20cc3..d286379 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -139,7 +139,8 @@ static Constant *FoldBitCast(Constant *V, Type *DestTy) { // and dest type have the same size (otherwise its an illegal cast). if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) { if (VectorType *SrcTy = dyn_cast<VectorType>(V->getType())) { - assert(DestPTy->getBitWidth() == SrcTy->getBitWidth() && + assert(DestPTy->getPrimitiveSizeInBits() == + SrcTy->getPrimitiveSizeInBits() && "Not cast between same sized vectors!"); SrcTy = nullptr; // First, check for null. Undef is already handled. |