mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 15:48:38 +00:00
Add sub reg-reg pattern
llvm-svn: 75916
This commit is contained in:
parent
2dd607fca7
commit
2688d3c0a7
@ -77,6 +77,12 @@ def OR64rr : Pseudo<(outs GR64:$dst), (ins GR64:$src1, GR64:$src2),
|
||||
}
|
||||
// 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),
|
||||
|
7
test/CodeGen/SystemZ/02-RetSub.ll
Normal file
7
test/CodeGen/SystemZ/02-RetSub.ll
Normal file
@ -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
|
||||
}
|
7
test/CodeGen/SystemZ/02-RetSubImm.ll
Normal file
7
test/CodeGen/SystemZ/02-RetSubImm.ll
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user