aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorMichael Maitland <michaeltmaitland@gmail.com>2024-03-26 17:41:46 -0700
committerMichael Maitland <michaeltmaitland@gmail.com>2024-03-26 17:41:46 -0700
commitd345599c2851c7ef25d2350244cbfe7cfef36386 (patch)
tree875f236c4637dc8fd60f8888a80032ffa6b067ac /llvm/lib/CodeGen/MachineVerifier.cpp
parent373d8755140df0c760e9c292c5f88479cdda6f4c (diff)
downloadllvm-d345599c2851c7ef25d2350244cbfe7cfef36386.zip
llvm-d345599c2851c7ef25d2350244cbfe7cfef36386.tar.gz
llvm-d345599c2851c7ef25d2350244cbfe7cfef36386.tar.bz2
[GISEL][NFC] Use getElementCount instead of getNumElements in more places
These cases in particular are done as a precommit to support legalization, regbank selection, and instruction selection for extends, splat vectors, and integer compares in #85938.
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 9a1498d..e4e05ce 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1506,7 +1506,8 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
LLT SrcTy = MRI->getType(MI->getOperand(2).getReg());
if ((DstTy.isVector() != SrcTy.isVector()) ||
- (DstTy.isVector() && DstTy.getNumElements() != SrcTy.getNumElements()))
+ (DstTy.isVector() &&
+ DstTy.getElementCount() != SrcTy.getElementCount()))
report("Generic vector icmp/fcmp must preserve number of lanes", MI);
break;