File: divrem.ll

package info (click to toggle)
llvm-toolchain-3.5 1%3A3.5-10
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 282,028 kB
  • ctags: 310,872
  • sloc: cpp: 1,883,926; ansic: 310,731; objc: 86,612; python: 79,565; asm: 65,844; sh: 9,829; makefile: 6,057; perl: 5,589; ml: 5,254; pascal: 3,285; lisp: 1,640; xml: 686; cs: 239; csh: 117
file content (58 lines) | stat: -rw-r--r-- 1,278 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
; RUN: llc < %s -march=x86-64 | grep div | count 8

define void @si64(i64 %x, i64 %y, i64* %p, i64* %q) {
	%r = sdiv i64 %x, %y
	%t = srem i64 %x, %y
	store i64 %r, i64* %p
	store i64 %t, i64* %q
	ret void
}
define void @si32(i32 %x, i32 %y, i32* %p, i32* %q) {
	%r = sdiv i32 %x, %y
	%t = srem i32 %x, %y
	store i32 %r, i32* %p
	store i32 %t, i32* %q
	ret void
}
define void @si16(i16 %x, i16 %y, i16* %p, i16* %q) {
	%r = sdiv i16 %x, %y
	%t = srem i16 %x, %y
	store i16 %r, i16* %p
	store i16 %t, i16* %q
	ret void
}
define void @si8(i8 %x, i8 %y, i8* %p, i8* %q) {
	%r = sdiv i8 %x, %y
	%t = srem i8 %x, %y
	store i8 %r, i8* %p
	store i8 %t, i8* %q
	ret void
}
define void @ui64(i64 %x, i64 %y, i64* %p, i64* %q) {
	%r = udiv i64 %x, %y
	%t = urem i64 %x, %y
	store i64 %r, i64* %p
	store i64 %t, i64* %q
	ret void
}
define void @ui32(i32 %x, i32 %y, i32* %p, i32* %q) {
	%r = udiv i32 %x, %y
	%t = urem i32 %x, %y
	store i32 %r, i32* %p
	store i32 %t, i32* %q
	ret void
}
define void @ui16(i16 %x, i16 %y, i16* %p, i16* %q) {
	%r = udiv i16 %x, %y
	%t = urem i16 %x, %y
	store i16 %r, i16* %p
	store i16 %t, i16* %q
	ret void
}
define void @ui8(i8 %x, i8 %y, i8* %p, i8* %q) {
	%r = udiv i8 %x, %y
	%t = urem i8 %x, %y
	store i8 %r, i8* %p
	store i8 %t, i8* %q
	ret void
}