aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2025-03-18 08:31:11 +0000
committerGitHub <noreply@github.com>2025-03-18 08:31:11 +0000
commitbd1be8a242384d98ef2087f4571b464e01501f5a (patch)
treeeb5ec1008c20d06f374998120130e0e4a475569c /llvm/lib/CodeGen/MachineVerifier.cpp
parente614e840bc6419ecde584605f2b813dcda7582e7 (diff)
downloadllvm-bd1be8a242384d98ef2087f4571b464e01501f5a.zip
llvm-bd1be8a242384d98ef2087f4571b464e01501f5a.tar.gz
llvm-bd1be8a242384d98ef2087f4571b464e01501f5a.tar.bz2
[CodeGen][GlobalISel] Add a getVectorIdxWidth and getVectorIdxLLT. (#131526)
From #106446, this adds a variant of getVectorIdxTy that returns an LLT. Many uses only look at the width, so a getVectorIdxWidth was added as the common base.
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineVerifier.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp
index 87d3033..b806790 100644
--- a/llvm/lib/CodeGen/MachineVerifier.cpp
+++ b/llvm/lib/CodeGen/MachineVerifier.cpp
@@ -1993,8 +1993,7 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
}
auto TLI = MF->getSubtarget().getTargetLowering();
- if (IdxTy.getSizeInBits() !=
- TLI->getVectorIdxTy(MF->getDataLayout()).getFixedSizeInBits()) {
+ if (IdxTy.getSizeInBits() != TLI->getVectorIdxWidth(MF->getDataLayout())) {
report("Index type must match VectorIdxTy", MI);
break;
}
@@ -2023,8 +2022,7 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
}
auto TLI = MF->getSubtarget().getTargetLowering();
- if (IdxTy.getSizeInBits() !=
- TLI->getVectorIdxTy(MF->getDataLayout()).getFixedSizeInBits()) {
+ if (IdxTy.getSizeInBits() != TLI->getVectorIdxWidth(MF->getDataLayout())) {
report("Index type must match VectorIdxTy", MI);
break;
}