From b97240dba8bcf0197ad4938f40adb98c53698831 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 21 Jul 2014 14:01:12 +0000 Subject: [PATCH] R600/SI: Add isCFDepth0 Predicate to SALU addc pattern git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213529 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/SIInstructions.td | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td index 4257f4e39bf..15f77b3d0b3 100644 --- a/lib/Target/R600/SIInstructions.td +++ b/lib/Target/R600/SIInstructions.td @@ -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 //============================================================================// -- 2.34.1