summaryrefslogtreecommitdiff
path: root/lib/Target/R600
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-18 20:09:37 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-11-18 20:09:37 +0000
commitb2254e603d12be6673d58f098cd384203f964e55 (patch)
treed886e21070ef011e7f1a99075760f9b1f003858b /lib/Target/R600
parent62f35fb9267d4c58d5359c43358ab42c25708df4 (diff)
downloadllvm-b2254e603d12be6673d58f098cd384203f964e55.tar.gz
llvm-b2254e603d12be6673d58f098cd384203f964e55.tar.bz2
llvm-b2254e603d12be6673d58f098cd384203f964e55.tar.xz
R600/SI: Match addc to S_ADD_U32.
The carry always goes to SCC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600')
-rw-r--r--lib/Target/R600/SIInstructions.td7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
index 3ac96d8ea8..10126f6da0 100644
--- a/lib/Target/R600/SIInstructions.td
+++ b/lib/Target/R600/SIInstructions.td
@@ -2054,6 +2054,13 @@ def : Pat <
(EXTRACT_SUBREG $a, sub0)
>;
+// 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)
+>;
+
def : Pat <
(or i64:$a, i64:$b),
(INSERT_SUBREG