[Mesa-dev] [PATCH] R600: Make store_dummy intrinsic more general by passing export type

Vincent Lejeune peluche.canard at gmail.com
Fri Jan 25 07:26:08 PST 2013


---
 lib/Target/R600/R600Instructions.td | 9 +++++++--
 lib/Target/R600/R600Intrinsics.td   | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td
index 13293b6..3537906 100644
--- a/lib/Target/R600/R600Instructions.td
+++ b/lib/Target/R600/R600Instructions.td
@@ -608,9 +608,14 @@ multiclass ExportPattern<Instruction ExportInst, bits<8> cf_inst> {
         0, 61, 7, 0, 7, 7, cf_inst, 0)
   >;
 
-  def : Pat<(int_R600_store_pixel_dummy),
+  def : Pat<(int_R600_store_dummy (i32 imm:$type)),
     (ExportInst
-        (v4f32 (IMPLICIT_DEF)), 0, 0, 7, 7, 7, 7, cf_inst, 0)
+        (v4f32 (IMPLICIT_DEF)), imm:$type, 0, 7, 7, 7, 7, cf_inst, 0)
+  >;
+
+  def : Pat<(int_R600_store_dummy 1),
+    (ExportInst
+        (v4f32 (IMPLICIT_DEF)), 1, 60, 7, 7, 7, 7, cf_inst, 0)
   >;
 
   def : Pat<(EXPORT (v4f32 R600_Reg128:$src), (i32 imm:$base), (i32 imm:$type),
diff --git a/lib/Target/R600/R600Intrinsics.td b/lib/Target/R600/R600Intrinsics.td
index 4c652a6..b5e4f1e 100644
--- a/lib/Target/R600/R600Intrinsics.td
+++ b/lib/Target/R600/R600Intrinsics.td
@@ -24,6 +24,6 @@ let TargetPrefix = "R600", isTarget = 1 in {
       Intrinsic<[], [llvm_float_ty], []>;
   def int_R600_store_pixel_stencil :
       Intrinsic<[], [llvm_float_ty], []>;
-  def int_R600_store_pixel_dummy :
-      Intrinsic<[], [], []>;
+  def int_R600_store_dummy :
+      Intrinsic<[], [llvm_i32_ty], []>;
 }
-- 
1.8.1



More information about the mesa-dev mailing list