[llvm] r361776 - [AMDGPU] Fix for the address sanitizer failure. Fixing typo
Alexander Timofeev via llvm-commits
llvm-commits at lists.llvm.org
Mon May 27 11:17:21 PDT 2019
Author: alex-t
Date: Mon May 27 11:17:21 2019
New Revision: 361776
URL: http://llvm.org/viewvc/llvm-project?rev=361776&view=rev
Log:
[AMDGPU] Fix for the address sanitizer failure. Fixing typo
Modified:
llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp?rev=361776&r1=361775&r2=361776&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp Mon May 27 11:17:21 2019
@@ -596,7 +596,7 @@ bool SIFixSGPRCopies::runOnMachineFuncti
unsigned OpNo = UseMI->getOperandNo(&Use);
const MCInstrDesc &Desc = TII->get(UseMI->getOpcode());
if (!Desc.isPseudo() && Desc.OpInfo &&
- OpNo <= Desc.getNumOperands() &&
+ OpNo < Desc.getNumOperands() &&
Desc.OpInfo[OpNo].RegClass != -1) {
const TargetRegisterClass *OpRC =
TRI->getRegClass(Desc.OpInfo[OpNo].RegClass);
More information about the llvm-commits
mailing list