File: thumb2-pack.ll

package info (click to toggle)
llvm 2.6-9.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 57,604 kB
  • ctags: 44,336
  • sloc: cpp: 344,766; sh: 12,407; ansic: 10,617; ada: 3,070; ml: 2,505; perl: 2,496; makefile: 1,426; pascal: 1,163; exp: 389; asm: 307; python: 298; objc: 260; lisp: 182; csh: 117; xml: 38; f90: 36; tcl: 20
file content (73 lines) | stat: -rw-r--r-- 2,246 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | \
; RUN:   grep pkhbt | count 5
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | \
; RUN:   grep pkhtb | count 4

define i32 @test1(i32 %X, i32 %Y) {
	%tmp1 = and i32 %X, 65535		; <i32> [#uses=1]
	%tmp4 = shl i32 %Y, 16		; <i32> [#uses=1]
	%tmp5 = or i32 %tmp4, %tmp1		; <i32> [#uses=1]
	ret i32 %tmp5
}

define i32 @test1a(i32 %X, i32 %Y) {
	%tmp19 = and i32 %X, 65535		; <i32> [#uses=1]
	%tmp37 = shl i32 %Y, 16		; <i32> [#uses=1]
	%tmp5 = or i32 %tmp37, %tmp19		; <i32> [#uses=1]
	ret i32 %tmp5
}

define i32 @test2(i32 %X, i32 %Y) {
	%tmp1 = and i32 %X, 65535		; <i32> [#uses=1]
	%tmp3 = shl i32 %Y, 12		; <i32> [#uses=1]
	%tmp4 = and i32 %tmp3, -65536		; <i32> [#uses=1]
	%tmp57 = or i32 %tmp4, %tmp1		; <i32> [#uses=1]
	ret i32 %tmp57
}

define i32 @test3(i32 %X, i32 %Y) {
	%tmp19 = and i32 %X, 65535		; <i32> [#uses=1]
	%tmp37 = shl i32 %Y, 18		; <i32> [#uses=1]
	%tmp5 = or i32 %tmp37, %tmp19		; <i32> [#uses=1]
	ret i32 %tmp5
}

define i32 @test4(i32 %X, i32 %Y) {
	%tmp1 = and i32 %X, 65535		; <i32> [#uses=1]
	%tmp3 = and i32 %Y, -65536		; <i32> [#uses=1]
	%tmp46 = or i32 %tmp3, %tmp1		; <i32> [#uses=1]
	ret i32 %tmp46
}

define i32 @test5(i32 %X, i32 %Y) {
	%tmp17 = and i32 %X, -65536		; <i32> [#uses=1]
	%tmp2 = bitcast i32 %Y to i32		; <i32> [#uses=1]
	%tmp4 = lshr i32 %tmp2, 16		; <i32> [#uses=2]
	%tmp5 = or i32 %tmp4, %tmp17		; <i32> [#uses=1]
	ret i32 %tmp5
}

define i32 @test5a(i32 %X, i32 %Y) {
	%tmp110 = and i32 %X, -65536		; <i32> [#uses=1]
	%tmp37 = lshr i32 %Y, 16		; <i32> [#uses=1]
	%tmp39 = bitcast i32 %tmp37 to i32		; <i32> [#uses=1]
	%tmp5 = or i32 %tmp39, %tmp110		; <i32> [#uses=1]
	ret i32 %tmp5
}

define i32 @test6(i32 %X, i32 %Y) {
	%tmp1 = and i32 %X, -65536		; <i32> [#uses=1]
	%tmp37 = lshr i32 %Y, 12		; <i32> [#uses=1]
	%tmp38 = bitcast i32 %tmp37 to i32		; <i32> [#uses=1]
	%tmp4 = and i32 %tmp38, 65535		; <i32> [#uses=1]
	%tmp59 = or i32 %tmp4, %tmp1		; <i32> [#uses=1]
	ret i32 %tmp59
}

define i32 @test7(i32 %X, i32 %Y) {
	%tmp1 = and i32 %X, -65536		; <i32> [#uses=1]
	%tmp3 = ashr i32 %Y, 18		; <i32> [#uses=1]
	%tmp4 = and i32 %tmp3, 65535		; <i32> [#uses=1]
	%tmp57 = or i32 %tmp4, %tmp1		; <i32> [#uses=1]
	ret i32 %tmp57
}