mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-25 21:00:00 +00:00
Use "adcs/sbcs" only when the carry-out is live, otherwise use "adc/sbc".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74321 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d8ac1be686
commit
7ce720b448
@ -236,19 +236,19 @@ let Uses = [CPSR] in {
|
||||
multiclass T2I_adde_sube_irs<string opc, PatFrag opnode, bit Commutable = 0> {
|
||||
// shifted imm
|
||||
def ri : T2sI<(outs GPR:$dst), (ins GPR:$lhs, t2_so_imm:$rhs),
|
||||
opc, "s $dst, $lhs, $rhs",
|
||||
opc, " $dst, $lhs, $rhs",
|
||||
[(set GPR:$dst, (opnode GPR:$lhs, t2_so_imm:$rhs))]>,
|
||||
Requires<[IsThumb, HasThumb2, CarryDefIsUnused]>;
|
||||
// register
|
||||
def rr : T2sI<(outs GPR:$dst), (ins GPR:$lhs, GPR:$rhs),
|
||||
opc, "s $dst, $lhs, $rhs",
|
||||
opc, " $dst, $lhs, $rhs",
|
||||
[(set GPR:$dst, (opnode GPR:$lhs, GPR:$rhs))]>,
|
||||
Requires<[IsThumb, HasThumb2, CarryDefIsUnused]> {
|
||||
let isCommutable = Commutable;
|
||||
}
|
||||
// shifted register
|
||||
def rs : T2sI<(outs GPR:$dst), (ins GPR:$lhs, t2_so_reg:$rhs),
|
||||
opc, "s $dst, $lhs, $rhs",
|
||||
opc, " $dst, $lhs, $rhs",
|
||||
[(set GPR:$dst, (opnode GPR:$lhs, t2_so_reg:$rhs))]>,
|
||||
Requires<[IsThumb, HasThumb2, CarryDefIsUnused]>;
|
||||
// Carry setting variants
|
||||
|
@ -1,6 +1,6 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep "subs r" | count 2
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep "adcs r"
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep "sbcs r" | count 2
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep "adc r"
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep "sbc r" | count 2
|
||||
|
||||
define i64 @f1(i64 %a, i64 %b) {
|
||||
entry:
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {adcs\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#171\\|#1179666\\|#872428544\\|#1448498774\\|#66846720} | count 5
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {adc\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#171\\|#1179666\\|#872428544\\|#1448498774\\|#66846720} | count 5
|
||||
|
||||
; 734439407617 = 0x000000ab00000001
|
||||
define i64 @f1(i64 %a) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {adcs\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]*} | count 1
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {adc\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]*} | count 1
|
||||
|
||||
define i64 @f1(i64 %a, i64 %b) {
|
||||
%tmp = add i64 %a, %b
|
||||
|
Loading…
Reference in New Issue
Block a user