mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-03 14:08:57 +00:00
Add test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df269b9129
commit
5b76c63f83
27
test/CodeGen/ARM/divmod.ll
Normal file
27
test/CodeGen/ARM/divmod.ll
Normal file
@ -0,0 +1,27 @@
|
||||
; RUN: llc < %s -mtriple=arm-apple-darwin -arm-divmod-libcall | FileCheck %s
|
||||
|
||||
define void @foo(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
|
||||
entry:
|
||||
; CHECK: foo:
|
||||
; CHECK: bl ___divmodsi4
|
||||
; CHECK-NOT: bl ___divmodsi4
|
||||
%div = sdiv i32 %x, %y
|
||||
store i32 %div, i32* %P, align 4
|
||||
%rem = srem i32 %x, %y
|
||||
%arrayidx6 = getelementptr inbounds i32* %P, i32 1
|
||||
store i32 %rem, i32* %arrayidx6, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @bar(i32 %x, i32 %y, i32* nocapture %P) nounwind ssp {
|
||||
entry:
|
||||
; CHECK: bar:
|
||||
; CHECK: bl ___udivmodsi4
|
||||
; CHECK-NOT: bl ___udivmodsi4
|
||||
%div = udiv i32 %x, %y
|
||||
store i32 %div, i32* %P, align 4
|
||||
%rem = urem i32 %x, %y
|
||||
%arrayidx6 = getelementptr inbounds i32* %P, i32 1
|
||||
store i32 %rem, i32* %arrayidx6, align 4
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user