]> granicus.if.org Git - llvm/commitdiff
R600/SI: Add isCFDepth0 Predicate to SALU addc pattern
authorTom Stellard <thomas.stellard@amd.com>
Mon, 21 Jul 2014 14:01:12 +0000 (14:01 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 21 Jul 2014 14:01:12 +0000 (14:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213529 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/R600/SIInstructions.td

index 4257f4e39bffd4d2fa9f2c04286e657824d31c97..15f77b3d0b3ed6acec04e6a662be47fbf43dced2 100644 (file)
@@ -1784,13 +1784,21 @@ def : Pat <
     (S_MOV_B32 0), sub1)
 >;
 
-} // Predicates = [isSI, isCFDepth0]
-
-let  Predicates = [isSI] in {
 //===----------------------------------------------------------------------===//
 // SOP2 Patterns
 //===----------------------------------------------------------------------===//
 
+// V_ADD_I32_e32/S_ADD_I32 produces carry in VCC/SCC. For the vector
+// case, the sgpr-copies pass will fix this to use the vector version.
+def : Pat <
+  (i32 (addc i32:$src0, i32:$src1)),
+  (S_ADD_I32 $src0, $src1)
+>;
+
+} // Predicates = [isSI, isCFDepth0]
+
+let  Predicates = [isSI] in {
+
 //===----------------------------------------------------------------------===//
 // SOPP Patterns
 //===----------------------------------------------------------------------===//
@@ -1854,6 +1862,11 @@ def : Pat <
     (V_MOV_B32_e32 0), sub1)
 >;
 
+def : Pat <
+  (addc i32:$src0, i32:$src1),
+  (V_ADD_I32_e32 $src0, $src1)
+>;
+
 /********** ======================= **********/
 /********** Image sampling patterns **********/
 /********** ======================= **********/
@@ -2848,13 +2861,6 @@ def : Pat <
   (V_CMP_EQ_I32_e64 (V_AND_B32_e32 (i32 1), $a), 1)
 >;
 
-// V_ADD_I32_e32/S_ADD_I32 produces carry in VCC/SCC. For the vector
-// case, the sgpr-copies pass will fix this to use the vector version.
-def : Pat <
-  (i32 (addc i32:$src0, i32:$src1)),
-  (S_ADD_I32 $src0, $src1)
->;
-
 //============================================================================//
 // Miscellaneous Optimization Patterns
 //============================================================================//