Skip to content

Commit 1bfcc60

Browse files
committed
[AMDGPU] Added assert in SIFoldOperands before ptr use. NFC.
1 parent 3eecd60 commit 1bfcc60

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/AMDGPU/SIFoldOperands.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,7 @@ void SIFoldOperands::foldInstOperand(MachineInstr &MI,
12081208
Copy->addImplicitDefUseOperands(*MF);
12091209

12101210
for (FoldCandidate &Fold : FoldList) {
1211+
assert(!Fold.isReg() || Fold.OpToFold);
12111212
if (Fold.isReg() && Register::isVirtualRegister(Fold.OpToFold->getReg())) {
12121213
Register Reg = Fold.OpToFold->getReg();
12131214
MachineInstr *DefMI = Fold.OpToFold->getParent();

0 commit comments

Comments
 (0)