[llvm-commits] [llvm] r75915 - in /llvm/trunk: lib/Target/SystemZ/SystemZInstrInfo.td test/CodeGen/SystemZ/02-RetXor.ll test/CodeGen/SystemZ/02-RetXorImm.ll
Anton Korobeynikov
asl at math.spbu.ru
Thu Jul 16 06:31:42 PDT 2009
Author: asl
Date: Thu Jul 16 08:31:28 2009
New Revision: 75915
URL: http://llvm.org/viewvc/llvm-project?rev=75915&view=rev
Log:
Add xor reg-reg pattern
Added:
llvm/trunk/test/CodeGen/SystemZ/02-RetXor.ll
llvm/trunk/test/CodeGen/SystemZ/02-RetXorImm.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=75915&r1=75914&r2=75915&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZInstrInfo.td Thu Jul 16 08:31:28 2009
@@ -77,5 +77,12 @@
}
// FIXME: provide patterns for masked or-with-imm
+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),
+ "xgr\t{$dst, $src2}",
+ [(set GR64:$dst, (xor GR64:$src1, GR64:$src2))]>;
+}
+
} // Defs = [PSW]
} // isTwoAddress = 1
Added: llvm/trunk/test/CodeGen/SystemZ/02-RetXor.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/02-RetXor.ll?rev=75915&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/SystemZ/02-RetXor.ll (added)
+++ llvm/trunk/test/CodeGen/SystemZ/02-RetXor.ll Thu Jul 16 08:31:28 2009
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc
+define i64 @foo(i64 %a, i64 %b) {
+entry:
+ %c = xor i64 %a, %b
+ ret i64 %c
+}
\ No newline at end of file
Added: llvm/trunk/test/CodeGen/SystemZ/02-RetXorImm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/02-RetXorImm.ll?rev=75915&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/SystemZ/02-RetXorImm.ll (added)
+++ llvm/trunk/test/CodeGen/SystemZ/02-RetXorImm.ll Thu Jul 16 08:31:28 2009
@@ -0,0 +1,6 @@
+; RUN: llvm-as < %s | llc
+define i64 @foo(i64 %a, i64 %b) {
+entry:
+ %c = xor i64 %a, 1
+ ret i64 %c
+}
\ No newline at end of file
More information about the llvm-commits
mailing list