diff options
author | Reid Kleckner <rnk@google.com> | 2020-02-03 11:12:09 -0800 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2020-02-03 11:12:09 -0800 |
commit | a05441038a3a4a011b9421751367c5c797d57137 (patch) | |
tree | 1eb8070301b5157cf4ac791bf7f7fd3fbe4bc9e3 /llvm/lib/IR/ConstantFold.cpp | |
parent | 0ad18bf37b2d4f6a619f2ebdd6cfbe0ac617a2e5 (diff) | |
download | llvm-a05441038a3a4a011b9421751367c5c797d57137.zip llvm-a05441038a3a4a011b9421751367c5c797d57137.tar.gz llvm-a05441038a3a4a011b9421751367c5c797d57137.tar.bz2 |
Revert "[SVE] Fix bug in simplification of scalable vector instructions"
This reverts commit 31574d38ac5fa4646cf01dd252a23e682402134f.
The newly added shufflevector test does not pass locally on either of my
workstations.
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index cd037f0b..9fd7dbd 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -863,12 +863,12 @@ Constant *llvm::ConstantFoldInsertElementInstruction(Constant *Val, Constant *llvm::ConstantFoldShuffleVectorInstruction(Constant *V1, Constant *V2, Constant *Mask) { - ElementCount MaskEltCount = Mask->getType()->getVectorElementCount(); + unsigned MaskNumElts = Mask->getType()->getVectorNumElements(); Type *EltTy = V1->getType()->getVectorElementType(); // Undefined shuffle mask -> undefined value. if (isa<UndefValue>(Mask)) - return UndefValue::get(VectorType::get(EltTy, MaskEltCount)); + return UndefValue::get(VectorType::get(EltTy, MaskNumElts)); // Don't break the bitcode reader hack. if (isa<ConstantExpr>(Mask)) return nullptr; @@ -879,7 +879,6 @@ Constant *llvm::ConstantFoldShuffleVectorInstruction(Constant *V1, if (ValTy->isScalable()) return nullptr; - unsigned MaskNumElts = MaskEltCount.Min; unsigned SrcNumElts = V1->getType()->getVectorNumElements(); // Loop over the shuffle mask, evaluating each element. |