llvm.org GIT mirror llvm / b97240d
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 Tom Stellard 6 years ago
1 changed file(s) with 16 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
17831783 (S_MOV_B32 0), sub1)
17841784 >;
17851785
1786 //===----------------------------------------------------------------------===//
1787 // SOP2 Patterns
1788 //===----------------------------------------------------------------------===//
1789
1790 // V_ADD_I32_e32/S_ADD_I32 produces carry in VCC/SCC. For the vector
1791 // case, the sgpr-copies pass will fix this to use the vector version.
1792 def : Pat <
1793 (i32 (addc i32:$src0, i32:$src1)),
1794 (S_ADD_I32 $src0, $src1)
1795 >;
1796
17861797 } // Predicates = [isSI, isCFDepth0]
17871798
17881799 let Predicates = [isSI] in {
1789 //===----------------------------------------------------------------------===//
1790 // SOP2 Patterns
1791 //===----------------------------------------------------------------------===//
17921800
17931801 //===----------------------------------------------------------------------===//
17941802 // SOPP Patterns
18511859 (V_BCNT_U32_B32_e64 (EXTRACT_SUBREG $src, sub0), 0, 0, 0)),
18521860 sub0),
18531861 (V_MOV_B32_e32 0), sub1)
1862 >;
1863
1864 def : Pat <
1865 (addc i32:$src0, i32:$src1),
1866 (V_ADD_I32_e32 $src0, $src1)
18541867 >;
18551868
18561869 /********** ======================= **********/
28472860 (V_CMP_EQ_I32_e64 (V_AND_B32_e32 (i32 1), $a), 1)
28482861 >;
28492862
2850 // V_ADD_I32_e32/S_ADD_I32 produces carry in VCC/SCC. For the vector
2851 // case, the sgpr-copies pass will fix this to use the vector version.
2852 def : Pat <
2853 (i32 (addc i32:$src0, i32:$src1)),
2854 (S_ADD_I32 $src0, $src1)
2855 >;
2856
28572863 //============================================================================//
28582864 // Miscellaneous Optimization Patterns
28592865 //============================================================================//