mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-06 17:24:34 +00:00
Add xor reg-reg pattern
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75915 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -77,5 +77,12 @@ def OR64rr : Pseudo<(outs GR64:$dst), (ins GR64:$src1, GR64:$src2),
|
|||||||
}
|
}
|
||||||
// FIXME: provide patterns for masked or-with-imm
|
// 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]
|
} // Defs = [PSW]
|
||||||
} // isTwoAddress = 1
|
} // isTwoAddress = 1
|
||||||
|
6
test/CodeGen/SystemZ/02-RetXor.ll
Normal file
6
test/CodeGen/SystemZ/02-RetXor.ll
Normal file
@ -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
|
||||||
|
}
|
6
test/CodeGen/SystemZ/02-RetXorImm.ll
Normal file
6
test/CodeGen/SystemZ/02-RetXorImm.ll
Normal file
@ -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
|
||||||
|
}
|
Reference in New Issue
Block a user