diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2020-08-19 17:13:28 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2020-08-19 17:21:37 +0000 |
commit | 4fc56d70aadea9df88e7bf408e2e203dc79ff8e6 (patch) | |
tree | 2791bcb20c217fc0844f81d466845409ebcd457f /llvm/lib/IR/Instructions.cpp | |
parent | d25b12bdc307264e353f1a3c4ccd65c0b45b2f86 (diff) | |
download | llvm-4fc56d70aadea9df88e7bf408e2e203dc79ff8e6.zip llvm-4fc56d70aadea9df88e7bf408e2e203dc79ff8e6.tar.gz llvm-4fc56d70aadea9df88e7bf408e2e203dc79ff8e6.tar.bz2 |
Revert "[NFC][llvm] Make the contructors of `ElementCount` private."
This reverts commit 264afb9e6aebc98c353644dd0700bec808501cab.
(and dependent 6b742cc48 and fc53bd610f)
MLIR/Flang are broken.
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r-- | llvm/lib/IR/Instructions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 7a3fbc36..2f17a0d 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -3330,9 +3330,9 @@ CastInst::castIsValid(Instruction::CastOps op, Value *S, Type *DstTy) { // scalar types means that checking that vector lengths match also checks that // scalars are not being converted to vectors or vectors to scalars). ElementCount SrcEC = SrcIsVec ? cast<VectorType>(SrcTy)->getElementCount() - : ElementCount::getFixed(0); + : ElementCount(0, false); ElementCount DstEC = DstIsVec ? cast<VectorType>(DstTy)->getElementCount() - : ElementCount::getFixed(0); + : ElementCount(0, false); // Switch on the opcode provided switch (op) { @@ -3390,9 +3390,9 @@ CastInst::castIsValid(Instruction::CastOps op, Value *S, Type *DstTy) { if (SrcIsVec && DstIsVec) return SrcEC == DstEC; if (SrcIsVec) - return SrcEC == ElementCount::getFixed(1); + return SrcEC == ElementCount(1, false); if (DstIsVec) - return DstEC == ElementCount::getFixed(1); + return DstEC == ElementCount(1, false); return true; } |