Skip to content

Commit ce70773

Browse files
Fix some typos in machine verifier comments and trace output (#160049)
Stumbled across a typo in the `MachineVerifier` file and since I had it open, I changed some other comments. Not important but why not leave it a bit cleaner 🙂 --------- Signed-off-by: Daniel Stadelmann <[email protected]>
1 parent f1b4a3b commit ce70773

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

llvm/lib/CodeGen/MachineVerifier.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) {
15491549
report("G_BUILD_VECTOR result element type must match source type", MI);
15501550

15511551
if (DstTy.getNumElements() != MI->getNumOperands() - 1)
1552-
report("G_BUILD_VECTOR must have an operand for each elemement", MI);
1552+
report("G_BUILD_VECTOR must have an operand for each element", MI);
15531553

15541554
for (const MachineOperand &MO : llvm::drop_begin(MI->operands(), 2))
15551555
if (MRI->getType(MI->getOperand(1).getReg()) != MRI->getType(MO.getReg()))
@@ -2398,11 +2398,11 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) {
23982398

23992399
// The next two checks allow COPY between physical and virtual registers,
24002400
// when the virtual register has a scalable size and the physical register
2401-
// has a fixed size. These checks allow COPY between *potentialy* mismatched
2402-
// sizes. However, once RegisterBankSelection occurs, MachineVerifier should
2403-
// be able to resolve a fixed size for the scalable vector, and at that
2404-
// point this function will know for sure whether the sizes are mismatched
2405-
// and correctly report a size mismatch.
2401+
// has a fixed size. These checks allow COPY between *potentially*
2402+
// mismatched sizes. However, once RegisterBankSelection occurs,
2403+
// MachineVerifier should be able to resolve a fixed size for the scalable
2404+
// vector, and at that point this function will know for sure whether the
2405+
// sizes are mismatched and correctly report a size mismatch.
24062406
if (SrcReg.isPhysical() && DstReg.isVirtual() && DstSize.isScalable() &&
24072407
!SrcSize.isScalable())
24082408
break;
@@ -3213,13 +3213,13 @@ struct VRegFilter {
32133213

32143214
private:
32153215
static constexpr unsigned SparseUniverseMax = 10 * 1024 * 8;
3216-
// VRegs indexed within SparseUniverseMax are tracked by Sparse, those beyound
3217-
// are tracked by Dense. The only purpose of the threashold and the Dense set
3216+
// VRegs indexed within SparseUniverseMax are tracked by Sparse, those beyond
3217+
// are tracked by Dense. The only purpose of the threshold and the Dense set
32183218
// is to have a reasonably growing memory usage in pathological cases (large
32193219
// number of very sparse VRegFilter instances live at the same time). In
32203220
// practice even in the worst-by-execution time cases having all elements
32213221
// tracked by Sparse (very large SparseUniverseMax scenario) tends to be more
3222-
// space efficient than if tracked by Dense. The threashold is set to keep the
3222+
// space efficient than if tracked by Dense. The threshold is set to keep the
32233223
// worst-case memory usage within 2x of figures determined empirically for
32243224
// "all Dense" scenario in such worst-by-execution-time cases.
32253225
BitVector Sparse;
@@ -3459,7 +3459,7 @@ void MachineVerifier::visitMachineFunctionAfter() {
34593459

34603460
// Check live-in list of each MBB. If a register is live into MBB, check
34613461
// that the register is in regsLiveOut of each predecessor block. Since
3462-
// this must come from a definition in the predecesssor or its live-in
3462+
// this must come from a definition in the predecessor or its live-in
34633463
// list, this will catch a live-through case where the predecessor does not
34643464
// have the register in its live-in list. This currently only checks
34653465
// registers that have no aliases, are not allocatable and are not

llvm/test/MachineVerifier/test_g_build_vector.mir

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ body: |
1616
; CHECK: Bad machine code: G_BUILD_VECTOR must produce a vector from scalar operands
1717
%3:_(<2 x s32>) = G_BUILD_VECTOR %2
1818
19-
; CHECK: Bad machine code: G_BUILD_VECTOR must have an operand for each elemement
19+
; CHECK: Bad machine code: G_BUILD_VECTOR must have an operand for each element
2020
%4:_(<2 x s32>) = G_BUILD_VECTOR %0, %0, %0, %0
2121
2222
; CHECK: Bad machine code: G_BUILD_VECTOR result element type must match source type
23-
; CHECK: Bad machine code: G_BUILD_VECTOR must have an operand for each elemement
23+
; CHECK: Bad machine code: G_BUILD_VECTOR must have an operand for each element
2424
%5:_(<4 x s16>) = G_BUILD_VECTOR %0, %0
2525
2626
%6:_(s16) = IMPLICIT_DEF
2727
2828
; CHECK: Bad machine code: G_BUILD_VECTOR result element type must match source type
29-
; CHECK: Bad machine code: G_BUILD_VECTOR must have an operand for each elemement
29+
; CHECK: Bad machine code: G_BUILD_VECTOR must have an operand for each element
3030
%7:_(<2 x s32>) = G_BUILD_VECTOR %6, %6, %6, %6
3131
3232
%8:_(p0) = IMPLICIT_DEF

0 commit comments

Comments
 (0)