[llvm-commits] [llvm] r75916 - in /llvm/trunk: lib/Target/SystemZ/SystemZInstrInfo.td test/CodeGen/SystemZ/02-RetSub.ll test/CodeGen/SystemZ/02-RetSubImm.ll

Anton Korobeynikov asl at math.spbu.ru
Thu Jul 16 06:32:22 PDT 2009


Author: asl
Date: Thu Jul 16 08:32:16 2009
New Revision: 75916

URL: http://llvm.org/viewvc/llvm-project?rev=75916&view=rev
Log:
Add sub reg-reg pattern

Added:
    llvm/trunk/test/CodeGen/SystemZ/02-RetSub.ll
    llvm/trunk/test/CodeGen/SystemZ/02-RetSubImm.ll
Modified:
    llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td

Modified: llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td?rev=75916&r1=75915&r2=75916&view=diff

==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td Thu Jul 16 08:32:16 2009
@@ -77,6 +77,12 @@
 }
 // FIXME: provide patterns for masked or-with-imm
 
+// FIXME: Provide proper encoding!
+def SUB64rr : Pseudo<(outs GR64:$dst), (ins GR64:$src1, GR64:$src2),
+                     "sgr\t{$dst, $src2}",
+                     [(set GR64:$dst, (sub GR64:$src1, GR64:$src2))]>;
+
+
 let isCommutable = 1 in { // X = XOR Y, Z  == X = XOR Z, Y
 // FIXME: Provide proper encoding!
 def XOR64rr : Pseudo<(outs GR64:$dst), (ins GR64:$src1, GR64:$src2),

Added: llvm/trunk/test/CodeGen/SystemZ/02-RetSub.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/02-RetSub.ll?rev=75916&view=auto

==============================================================================
--- llvm/trunk/test/CodeGen/SystemZ/02-RetSub.ll (added)
+++ llvm/trunk/test/CodeGen/SystemZ/02-RetSub.ll Thu Jul 16 08:32:16 2009
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | llc
+
+define i64 @foo(i64 %a, i64 %b) {
+entry:
+    %c = sub i64 %a, %b
+    ret i64 %c
+}
\ No newline at end of file

Added: llvm/trunk/test/CodeGen/SystemZ/02-RetSubImm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/02-RetSubImm.ll?rev=75916&view=auto

==============================================================================
--- llvm/trunk/test/CodeGen/SystemZ/02-RetSubImm.ll (added)
+++ llvm/trunk/test/CodeGen/SystemZ/02-RetSubImm.ll Thu Jul 16 08:32:16 2009
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | llc
+
+define i64 @foo(i64 %a, i64 %b) {
+entry:
+    %c = sub i64 %a, 1
+    ret i64 %c
+}
\ No newline at end of file





More information about the llvm-commits mailing list