From: Tom Stellard Date: Thu, 24 May 2012 17:42:23 +0000 (-0400) Subject: radeon/llvm: Avoid error with SI in EmitInstrWithCustomInserter() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc7a6d269170cc3668caa4f5af29228920e8d7a7;p=mesa.git radeon/llvm: Avoid error with SI in EmitInstrWithCustomInserter() We need to return immediately after inserting instructions that require S_WAITCNT so that the parent class' custom inserter won't try to insert them again. --- diff --git a/src/gallium/drivers/radeon/SIISelLowering.cpp b/src/gallium/drivers/radeon/SIISelLowering.cpp index e176defcf5d..4615db24266 100644 --- a/src/gallium/drivers/radeon/SIISelLowering.cpp +++ b/src/gallium/drivers/radeon/SIISelLowering.cpp @@ -39,6 +39,7 @@ MachineBasicBlock * SITargetLowering::EmitInstrWithCustomInserter( if (TII->get(MI->getOpcode()).TSFlags & SIInstrFlags::NEED_WAIT) { AppendS_WAITCNT(MI, *BB, llvm::next(I)); + return BB; } switch (MI->getOpcode()) {