Mesa (master): radeon/llvm: Avoid error with SI in EmitInstrWithCustomInserter()

Tom Stellard tstellar at kemper.freedesktop.org
Thu May 24 19:05:31 UTC 2012


Module: Mesa
Branch: master
Commit: cc7a6d269170cc3668caa4f5af29228920e8d7a7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc7a6d269170cc3668caa4f5af29228920e8d7a7

Author: Tom Stellard <thomas.stellard at amd.com>
Date:   Thu May 24 13:42:23 2012 -0400

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 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/radeon/SIISelLowering.cpp b/src/gallium/drivers/radeon/SIISelLowering.cpp
index e176def..4615db2 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()) {




More information about the mesa-commit mailing list