mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 02:16:46 +00:00
Add new test case for addcarry. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301932 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a2057043bd
commit
20c757b9a3
@ -186,3 +186,21 @@ entry:
|
|||||||
store i32 %19, i32* %15, align 4
|
store i32 %19, i32* %15, align 4
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
define i64 @shiftadd(i64 %a, i64 %b, i64 %c, i64 %d) {
|
||||||
|
; CHECK-LABEL: shiftadd:
|
||||||
|
; CHECK: # BB#0: # %entry
|
||||||
|
; CHECK-NEXT: leaq (%rdx,%rcx), %rax
|
||||||
|
; CHECK-NEXT: addq %rsi, %rdi
|
||||||
|
; CHECK-NEXT: adcq $0, %rax
|
||||||
|
; CHECK-NEXT: retq
|
||||||
|
entry:
|
||||||
|
%0 = zext i64 %a to i128
|
||||||
|
%1 = zext i64 %b to i128
|
||||||
|
%2 = add i128 %0, %1
|
||||||
|
%3 = lshr i128 %2, 64
|
||||||
|
%4 = trunc i128 %3 to i64
|
||||||
|
%5 = add i64 %c, %d
|
||||||
|
%6 = add i64 %4, %5
|
||||||
|
ret i64 %6
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user