diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index 4d388708308..b1964d68111 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -1022,13 +1022,13 @@ void MachineVerifier::verifyPreISelGenericInstruction(const MachineInstr *MI) { const MachineMemOperand &MMO = **MI->memoperands_begin(); if (MI->getOpcode() == TargetOpcode::G_ZEXTLOAD || MI->getOpcode() == TargetOpcode::G_SEXTLOAD) { - if (MMO.getSize() * 8 >= ValTy.getSizeInBits()) + if (MMO.getSizeInBits() >= ValTy.getSizeInBits()) report("Generic extload must have a narrower memory type", MI); } else if (MI->getOpcode() == TargetOpcode::G_LOAD) { - if (MMO.getSize() > (ValTy.getSizeInBits() + 7) / 8) + if (MMO.getSize() > ValTy.getSizeInBytes()) report("load memory size cannot exceed result size", MI); } else if (MI->getOpcode() == TargetOpcode::G_STORE) { - if ((ValTy.getSizeInBits() + 7) / 8 < MMO.getSize()) + if (ValTy.getSizeInBytes() < MMO.getSize()) report("store memory size cannot exceed value size", MI); } } |