[llvm-branch-commits] [llvm-branch] r166332 - /llvm/branches/R600/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp

Tom Stellard thomas.stellard at amd.com
Fri Oct 19 14:10:12 PDT 2012


Author: tstellar
Date: Fri Oct 19 16:10:12 2012
New Revision: 166332

URL: http://llvm.org/viewvc/llvm-project?rev=166332&view=rev
Log:
R600: Add support for the AMDGPU::BREAK instruction

Modified:
    llvm/branches/R600/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp

Modified: llvm/branches/R600/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/R600/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp?rev=166332&r1=166331&r2=166332&view=diff
==============================================================================
--- llvm/branches/R600/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp (original)
+++ llvm/branches/R600/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp Fri Oct 19 16:10:12 2012
@@ -208,7 +208,23 @@
         MI.eraseFromParent();
         continue;
         }
-     }
+      case AMDGPU::BREAK:
+        MachineInstr *PredSet = TII->buildDefaultInstruction(MBB, I,
+                                          AMDGPU::PRED_SETE_INT,
+                                          AMDGPU::PREDICATE_BIT,
+                                          AMDGPU::ZERO,
+                                          AMDGPU::ZERO);
+        TII->addFlag(PredSet, 0, MO_FLAG_MASK);
+        PredSet->getOperand(
+          TII->getOperandIdx(
+              *PredSet, R600Operands::UPDATE_EXEC_MASK)).setImm(1);
+
+        BuildMI(MBB, I, MBB.findDebugLoc(I),
+                TII->get(AMDGPU::BREAK_LOGICALNZ_i32))
+                .addReg(AMDGPU::PREDICATE_BIT);
+        MI.eraseFromParent();
+        continue;
+    }
 
     if (ExpandInputPerspective(MI))
       continue;





More information about the llvm-branch-commits mailing list