[llvm] 54ec8e2 - [X86][AMX] Fix klockwork issue.
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 14 18:27:26 PDT 2022
Author: Luo, Yuanke
Date: 2022-06-15T09:26:59+08:00
New Revision: 54ec8e25fcc5f638832bbbf9104a0fadca231007
URL: https://github.com/llvm/llvm-project/commit/54ec8e25fcc5f638832bbbf9104a0fadca231007
DIFF: https://github.com/llvm/llvm-project/commit/54ec8e25fcc5f638832bbbf9104a0fadca231007.diff
LOG: [X86][AMX] Fix klockwork issue.
Added:
Modified:
llvm/lib/Target/X86/X86FastPreTileConfig.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86FastPreTileConfig.cpp b/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
index 754baf2973d5..7e5540022cc8 100644
--- a/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
+++ b/llvm/lib/Target/X86/X86FastPreTileConfig.cpp
@@ -374,7 +374,7 @@ void X86FastPreTileConfig::convertPHI(MachineBasicBlock *MBB,
// The PHI node is coverted to tileload instruction. Get the stack
// address from tileload operands.
MachineInstr *TileLoad = MRI->getVRegDef(InTileReg);
- assert(TileLoad->getOpcode() == X86::PTILELOADDV);
+ assert(TileLoad && TileLoad->getOpcode() == X86::PTILELOADDV);
Register InRowReg = TileLoad->getOperand(1).getReg();
Register InColReg = TileLoad->getOperand(2).getReg();
Register InStackAddrReg = TileLoad->getOperand(3).getReg();
More information about the llvm-commits
mailing list