radeon/llvm: Avoid error with SI in EmitInstrWithCustomInserter()
authorTom Stellard <thomas.stellard@amd.com>
Thu, 24 May 2012 17:42:23 +0000 (13:42 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 24 May 2012 18:12:30 +0000 (14:12 -0400)
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

index e176defcf5dbafbe1f29d931a3683aea09ed3d02..4615db24266bbadfa55ce0a52eb05d128798ceff 100644 (file)
@@ -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()) {