From cc7a6d269170cc3668caa4f5af29228920e8d7a7 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 24 May 2012 13:42:23 -0400 Subject: [PATCH] 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. --- src/gallium/drivers/radeon/SIISelLowering.cpp | 1 + 1 file changed, 1 insertion(+) 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()) { -- 2.30.2