2016-07-23 20:41:05 +00:00
|
|
|
; RUN: llc -march=mips -mcpu=mips32 -verify-machineinstrs -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,ACC32,ACC32-TRAP
|
|
|
|
; RUN: llc -march=mips -mcpu=mips32r2 -verify-machineinstrs -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,ACC32,ACC32-TRAP
|
|
|
|
; RUN: llc -march=mips -mcpu=mips32r6 -verify-machineinstrs -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,GPR32,GPR32-TRAP
|
|
|
|
; RUN: llc -march=mips64 -mcpu=mips64 -verify-machineinstrs -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,ACC64,ACC64-TRAP
|
|
|
|
; RUN: llc -march=mips64 -mcpu=mips64r2 -verify-machineinstrs -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,ACC64,ACC64-TRAP
|
|
|
|
; RUN: llc -march=mips64 -mcpu=mips64r6 -verify-machineinstrs -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,GPR64,GPR64-TRAP
|
|
|
|
|
|
|
|
; RUN: llc -march=mips -mcpu=mips32 -mno-check-zero-division -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,ACC32,NOCHECK
|
|
|
|
; RUN: llc -march=mips -mcpu=mips32r2 -mno-check-zero-division -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,ACC32,NOCHECK
|
|
|
|
; RUN: llc -march=mips -mcpu=mips32r6 -mno-check-zero-division -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,GPR32,NOCHECK
|
|
|
|
; RUN: llc -march=mips64 -mcpu=mips64 -mno-check-zero-division -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,ACC64,NOCHECK
|
|
|
|
; RUN: llc -march=mips64 -mcpu=mips64r2 -mno-check-zero-division -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,ACC64,NOCHECK
|
|
|
|
; RUN: llc -march=mips64 -mcpu=mips64r6 -mno-check-zero-division -relocation-model=pic < %s | FileCheck %s -check-prefixes=ALL,GPR64,NOCHECK
|
2013-12-22 00:04:03 +00:00
|
|
|
|
2014-11-24 09:08:18 +00:00
|
|
|
; FileCheck Prefixes:
|
|
|
|
; ALL - All targets
|
|
|
|
; ACC32 - Accumulator based multiply/divide on 32-bit targets
|
|
|
|
; ACC64 - Same as ACC32 but only for 64-bit targets
|
|
|
|
; GPR32 - GPR based multiply/divide on 32-bit targets
|
|
|
|
; GPR64 - Same as GPR32 but only for 64-bit targets
|
|
|
|
; ACC32-TRAP - Same as TRAP and ACC32 combined
|
|
|
|
; ACC64-TRAP - Same as TRAP and ACC64 combined
|
|
|
|
; GPR32-TRAP - Same as TRAP and GPR32 combined
|
|
|
|
; GPR64-TRAP - Same as TRAP and GPR64 combined
|
|
|
|
; NOCHECK - Division by zero will not be detected
|
2013-12-22 00:04:03 +00:00
|
|
|
|
|
|
|
@g0 = common global i32 0, align 4
|
|
|
|
@g1 = common global i32 0, align 4
|
2011-05-02 19:34:44 +00:00
|
|
|
|
2015-01-15 22:30:16 +00:00
|
|
|
define i32 @sdiv1(i32 signext %a0, i32 signext %a1) nounwind readnone {
|
2011-05-02 19:34:44 +00:00
|
|
|
entry:
|
2014-11-24 09:08:18 +00:00
|
|
|
; ALL-LABEL: sdiv1:
|
|
|
|
|
|
|
|
; ACC32: div $zero, $4, $5
|
|
|
|
; ACC32-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; ACC64: div $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR32: div $2, $4, $5
|
|
|
|
; GPR32-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR64: div $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ACC32: mflo $2
|
|
|
|
; ACC64: mflo $2
|
|
|
|
|
|
|
|
; ALL: .end sdiv1
|
|
|
|
|
2011-05-02 19:34:44 +00:00
|
|
|
%div = sdiv i32 %a0, %a1
|
|
|
|
ret i32 %div
|
|
|
|
}
|
|
|
|
|
2015-01-15 22:30:16 +00:00
|
|
|
define i32 @srem1(i32 signext %a0, i32 signext %a1) nounwind readnone {
|
2011-05-02 19:34:44 +00:00
|
|
|
entry:
|
2014-11-24 09:08:18 +00:00
|
|
|
; ALL-LABEL: srem1:
|
|
|
|
|
|
|
|
; ACC32: div $zero, $4, $5
|
|
|
|
; ACC32-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; ACC64: div $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR32: mod $2, $4, $5
|
|
|
|
; GPR32-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR64: mod $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ACC32: mfhi $2
|
|
|
|
; ACC64: mfhi $2
|
|
|
|
|
|
|
|
; ALL: .end srem1
|
|
|
|
|
2011-05-02 19:34:44 +00:00
|
|
|
%rem = srem i32 %a0, %a1
|
|
|
|
ret i32 %rem
|
|
|
|
}
|
|
|
|
|
2016-07-23 20:41:05 +00:00
|
|
|
define i32 @udiv1(i32 signext %a0, i32 signext %a1) nounwind readnone {
|
2011-05-02 19:34:44 +00:00
|
|
|
entry:
|
2014-11-24 09:08:18 +00:00
|
|
|
; ALL-LABEL: udiv1:
|
|
|
|
|
|
|
|
; ACC32: divu $zero, $4, $5
|
|
|
|
; ACC32-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; ACC64: divu $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR32: divu $2, $4, $5
|
|
|
|
; GPR32-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR64: divu $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ACC32: mflo $2
|
|
|
|
; ACC64: mflo $2
|
|
|
|
|
|
|
|
; ALL: .end udiv1
|
2011-05-02 19:34:44 +00:00
|
|
|
%div = udiv i32 %a0, %a1
|
|
|
|
ret i32 %div
|
|
|
|
}
|
|
|
|
|
2016-07-23 20:41:05 +00:00
|
|
|
define i32 @urem1(i32 signext %a0, i32 signext %a1) nounwind readnone {
|
2011-05-02 19:34:44 +00:00
|
|
|
entry:
|
2014-11-24 09:08:18 +00:00
|
|
|
; ALL-LABEL: urem1:
|
|
|
|
|
|
|
|
; ACC32: divu $zero, $4, $5
|
|
|
|
; ACC32-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; ACC64: divu $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR32: modu $2, $4, $5
|
|
|
|
; GPR32-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR64: modu $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ACC32: mfhi $2
|
|
|
|
; ACC64: mfhi $2
|
|
|
|
|
|
|
|
; ALL: .end urem1
|
|
|
|
|
2011-05-02 19:34:44 +00:00
|
|
|
%rem = urem i32 %a0, %a1
|
|
|
|
ret i32 %rem
|
|
|
|
}
|
|
|
|
|
2015-01-15 22:30:16 +00:00
|
|
|
define i32 @sdivrem1(i32 signext %a0, i32 signext %a1, i32* nocapture %r) nounwind {
|
2011-05-02 19:34:44 +00:00
|
|
|
entry:
|
2014-11-24 09:08:18 +00:00
|
|
|
; ALL-LABEL: sdivrem1:
|
|
|
|
|
|
|
|
; ACC32: div $zero, $4, $5
|
|
|
|
; ACC32-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
; ACC32: mflo $2
|
|
|
|
; ACC32: mfhi $[[R0:[0-9]+]]
|
|
|
|
; ACC32: sw $[[R0]], 0(${{[0-9]+}})
|
|
|
|
|
|
|
|
; ACC64: div $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
; ACC64: mflo $2
|
|
|
|
; ACC64: mfhi $[[R0:[0-9]+]]
|
|
|
|
; ACC64: sw $[[R0]], 0(${{[0-9]+}})
|
|
|
|
|
2016-07-23 20:41:05 +00:00
|
|
|
; GPR32-DAG: mod $[[R0:[0-9]+]], $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR32-TRAP: teq $5, $zero, 7
|
2017-01-02 19:17:04 +00:00
|
|
|
; NOCHECK-NOT: teq
|
2016-07-23 20:41:05 +00:00
|
|
|
; GPR32: sw $[[R0]], 0(${{[0-9]+}})
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR32-DAG: div $2, $4, $5
|
|
|
|
; GPR32-TRAP: teq $5, $zero, 7
|
2014-11-24 09:08:18 +00:00
|
|
|
|
2016-07-23 20:41:05 +00:00
|
|
|
; GPR64-DAG: mod $[[R0:[0-9]+]], $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
2016-07-23 20:41:05 +00:00
|
|
|
; GPR64: sw $[[R0]], 0(${{[0-9]+}})
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR64-DAG: div $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
2014-11-24 09:08:18 +00:00
|
|
|
|
|
|
|
; ALL: .end sdivrem1
|
|
|
|
|
2011-05-02 19:34:44 +00:00
|
|
|
%rem = srem i32 %a0, %a1
|
2013-06-10 20:36:52 +00:00
|
|
|
store i32 %rem, i32* %r, align 4
|
2011-05-02 19:34:44 +00:00
|
|
|
%div = sdiv i32 %a0, %a1
|
|
|
|
ret i32 %div
|
|
|
|
}
|
|
|
|
|
2016-07-23 20:41:05 +00:00
|
|
|
define i32 @udivrem1(i32 signext %a0, i32 signext %a1, i32* nocapture %r) nounwind {
|
2011-05-02 19:34:44 +00:00
|
|
|
entry:
|
2014-11-24 09:08:18 +00:00
|
|
|
; ALL-LABEL: udivrem1:
|
|
|
|
|
|
|
|
; ACC32: divu $zero, $4, $5
|
|
|
|
; ACC32-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
; ACC32: mflo $2
|
|
|
|
; ACC32: mfhi $[[R0:[0-9]+]]
|
|
|
|
; ACC32: sw $[[R0]], 0(${{[0-9]+}})
|
|
|
|
|
|
|
|
; ACC64: divu $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
; ACC64: mflo $2
|
|
|
|
; ACC64: mfhi $[[R0:[0-9]+]]
|
|
|
|
; ACC64: sw $[[R0]], 0(${{[0-9]+}})
|
|
|
|
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR32-DAG: modu $[[R0:[0-9]+]], $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR32-TRAP: teq $5, $zero, 7
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR32: sw $[[R0]], 0(${{[0-9]+}})
|
2014-11-24 09:08:18 +00:00
|
|
|
; NOCHECK-NOT: teq
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR32-DAG: divu $2, $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR32-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
2016-07-23 20:41:05 +00:00
|
|
|
; GPR64-DAG: modu $[[R0:[0-9]+]], $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
2016-07-23 20:41:05 +00:00
|
|
|
; GPR64: sw $[[R0]], 0(${{[0-9]+}})
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR64-DAG: divu $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
2014-11-24 09:08:18 +00:00
|
|
|
|
|
|
|
; ALL: .end udivrem1
|
|
|
|
|
2011-05-02 19:34:44 +00:00
|
|
|
%rem = urem i32 %a0, %a1
|
2013-06-10 20:36:52 +00:00
|
|
|
store i32 %rem, i32* %r, align 4
|
2011-05-02 19:34:44 +00:00
|
|
|
%div = udiv i32 %a0, %a1
|
|
|
|
ret i32 %div
|
|
|
|
}
|
2013-12-22 00:04:03 +00:00
|
|
|
|
2014-11-24 09:08:18 +00:00
|
|
|
; FIXME: It's not clear what this is supposed to test.
|
2013-12-22 00:04:03 +00:00
|
|
|
define i32 @killFlags() {
|
|
|
|
entry:
|
2015-05-27 18:44:32 +00:00
|
|
|
%0 = load i32, i32* @g0, align 4
|
|
|
|
%1 = load i32, i32* @g1, align 4
|
2013-12-22 00:04:03 +00:00
|
|
|
%div = sdiv i32 %0, %1
|
|
|
|
ret i32 %div
|
|
|
|
}
|
2014-11-24 09:08:18 +00:00
|
|
|
|
|
|
|
define i64 @sdiv2(i64 %a0, i64 %a1) nounwind readnone {
|
|
|
|
entry:
|
|
|
|
; ALL-LABEL: sdiv2:
|
|
|
|
|
|
|
|
; ACC32: lw $25, %call16(__divdi3)(
|
|
|
|
; ACC32: jalr $25
|
|
|
|
|
|
|
|
; ACC64: ddiv $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR64: ddiv $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ACC64: mflo $2
|
|
|
|
|
|
|
|
; ALL: .end sdiv2
|
|
|
|
|
|
|
|
%div = sdiv i64 %a0, %a1
|
|
|
|
ret i64 %div
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @srem2(i64 %a0, i64 %a1) nounwind readnone {
|
|
|
|
entry:
|
|
|
|
; ALL-LABEL: srem2:
|
|
|
|
|
|
|
|
; ACC32: lw $25, %call16(__moddi3)(
|
|
|
|
; ACC32: jalr $25
|
|
|
|
|
|
|
|
; ACC64: div $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR64: dmod $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ACC64: mfhi $2
|
|
|
|
|
|
|
|
; ALL: .end srem2
|
|
|
|
|
|
|
|
%rem = srem i64 %a0, %a1
|
|
|
|
ret i64 %rem
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @udiv2(i64 %a0, i64 %a1) nounwind readnone {
|
|
|
|
entry:
|
|
|
|
; ALL-LABEL: udiv2:
|
|
|
|
|
|
|
|
; ACC32: lw $25, %call16(__udivdi3)(
|
|
|
|
; ACC32: jalr $25
|
|
|
|
|
|
|
|
; ACC64: divu $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR64: ddivu $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ACC64: mflo $2
|
|
|
|
|
|
|
|
; ALL: .end udiv2
|
|
|
|
%div = udiv i64 %a0, %a1
|
|
|
|
ret i64 %div
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @urem2(i64 %a0, i64 %a1) nounwind readnone {
|
|
|
|
entry:
|
|
|
|
; ALL-LABEL: urem2:
|
|
|
|
|
|
|
|
; ACC32: lw $25, %call16(__umoddi3)(
|
|
|
|
; ACC32: jalr $25
|
|
|
|
|
|
|
|
; ACC64: divu $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; GPR64: dmodu $2, $4, $5
|
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ACC64: mfhi $2
|
|
|
|
|
|
|
|
; ALL: .end urem2
|
|
|
|
|
|
|
|
%rem = urem i64 %a0, %a1
|
|
|
|
ret i64 %rem
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @sdivrem2(i64 %a0, i64 %a1, i64* nocapture %r) nounwind {
|
|
|
|
entry:
|
|
|
|
; ALL-LABEL: sdivrem2:
|
|
|
|
|
|
|
|
; sdivrem2 is too complex to effectively check. We can at least check for the
|
|
|
|
; calls though.
|
|
|
|
; ACC32: lw $25, %call16(__moddi3)(
|
|
|
|
; ACC32: jalr $25
|
|
|
|
; ACC32: lw $25, %call16(__divdi3)(
|
|
|
|
; ACC32: jalr $25
|
|
|
|
|
|
|
|
; ACC64: ddiv $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
; ACC64: mflo $2
|
|
|
|
; ACC64: mfhi $[[R0:[0-9]+]]
|
|
|
|
; ACC64: sd $[[R0]], 0(${{[0-9]+}})
|
|
|
|
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR64-DAG: dmod $[[R0:[0-9]+]], $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR64: sd $[[R0]], 0(${{[0-9]+}})
|
2014-11-24 09:08:18 +00:00
|
|
|
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR64-DAG: ddiv $2, $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ALL: .end sdivrem2
|
|
|
|
|
|
|
|
%rem = srem i64 %a0, %a1
|
|
|
|
store i64 %rem, i64* %r, align 8
|
|
|
|
%div = sdiv i64 %a0, %a1
|
|
|
|
ret i64 %div
|
|
|
|
}
|
|
|
|
|
|
|
|
define i64 @udivrem2(i64 %a0, i64 %a1, i64* nocapture %r) nounwind {
|
|
|
|
entry:
|
|
|
|
; ALL-LABEL: udivrem2:
|
|
|
|
|
|
|
|
; udivrem2 is too complex to effectively check. We can at least check for the
|
|
|
|
; calls though.
|
|
|
|
; ACC32: lw $25, %call16(__umoddi3)(
|
|
|
|
; ACC32: jalr $25
|
|
|
|
; ACC32: lw $25, %call16(__udivdi3)(
|
|
|
|
; ACC32: jalr $25
|
|
|
|
|
|
|
|
; ACC64: ddivu $zero, $4, $5
|
|
|
|
; ACC64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
; ACC64: mflo $2
|
|
|
|
; ACC64: mfhi $[[R0:[0-9]+]]
|
|
|
|
; ACC64: sd $[[R0]], 0(${{[0-9]+}})
|
|
|
|
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR64: dmodu $[[R0:[0-9]+]], $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR64: sd $[[R0]], 0(${{[0-9]+}})
|
2014-11-24 09:08:18 +00:00
|
|
|
|
2017-01-02 19:17:04 +00:00
|
|
|
; GPR64-DAG: ddivu $2, $4, $5
|
2014-11-24 09:08:18 +00:00
|
|
|
; GPR64-TRAP: teq $5, $zero, 7
|
|
|
|
; NOCHECK-NOT: teq
|
|
|
|
|
|
|
|
; ALL: .end udivrem2
|
|
|
|
|
|
|
|
%rem = urem i64 %a0, %a1
|
|
|
|
store i64 %rem, i64* %r, align 8
|
|
|
|
%div = udiv i64 %a0, %a1
|
|
|
|
ret i64 %div
|
|
|
|
}
|