implement smull and umull

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30975 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2006-10-16 16:33:29 +00:00
parent d9b8e40ab3
commit bec2e38a91
4 changed files with 43 additions and 6 deletions

View File

@@ -7,7 +7,9 @@
; RUN: llvm-as < %s | llc -march=arm | grep "adds" | wc -l | grep 1 &&
; RUN: llvm-as < %s | llc -march=arm | grep "adcs" | wc -l | grep 1 &&
; RUN: llvm-as < %s | llc -march=arm | grep "subs" | wc -l | grep 1 &&
; RUN: llvm-as < %s | llc -march=arm | grep "sbcs" | wc -l | grep 1
; RUN: llvm-as < %s | llc -march=arm | grep "sbcs" | wc -l | grep 1 &&
; RUN: llvm-as < %s | llc -march=arm | grep "smull" | wc -l | grep 1 &&
; RUN: llvm-as < %s | llc -march=arm | grep "umull" | wc -l | grep 1
long %f1() {
entry:
@@ -52,3 +54,19 @@ entry:
%tmp = sub long %a, %b
ret long %tmp
}
long %f(int %a, int %b) {
entry:
%tmp = cast int %a to long
%tmp1 = cast int %b to long
%tmp2 = mul long %tmp1, %tmp
ret long %tmp2
}
ulong %g(uint %a, uint %b) {
entry:
%tmp = cast uint %a to ulong
%tmp1 = cast uint %b to ulong
%tmp2 = mul ulong %tmp1, %tmp
ret ulong %tmp2
}