[llvm] r260676 - Fix uninitialized memory read.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 12 04:37:21 PST 2016


Author: d0k
Date: Fri Feb 12 06:37:21 2016
New Revision: 260676

URL: http://llvm.org/viewvc/llvm-project?rev=260676&view=rev
Log:
Fix uninitialized memory read.

Found by msan.

Modified:
    llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp?rev=260676&r1=260675&r2=260676&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp Fri Feb 12 06:37:21 2016
@@ -1816,8 +1816,8 @@ static bool isVOP3(OperandVector &Operan
 
   if (Operands.size() > 3) {
     AMDGPUOperand &Src1Op = ((AMDGPUOperand&)*Operands[3]);
-    if (Src1Op.getReg() && (Src1Op.isRegClass(AMDGPU::SReg_32RegClassID) ||
-                            Src1Op.isRegClass(AMDGPU::SReg_64RegClassID)))
+    if (Src1Op.isReg() && (Src1Op.isRegClass(AMDGPU::SReg_32RegClassID) ||
+                           Src1Op.isRegClass(AMDGPU::SReg_64RegClassID)))
       return true;
   }
   return false;




More information about the llvm-commits mailing list