comparison test/CodeGen/MSP430/Inst16mm.ll @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 95c75e76d11b
children 803732b1fca8
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
5 @bar = common global i16 0, align 2 5 @bar = common global i16 0, align 2
6 6
7 define void @mov() nounwind { 7 define void @mov() nounwind {
8 ; CHECK-LABEL: mov: 8 ; CHECK-LABEL: mov:
9 ; CHECK: mov.w &bar, &foo 9 ; CHECK: mov.w &bar, &foo
10 %1 = load i16* @bar 10 %1 = load i16, i16* @bar
11 store i16 %1, i16* @foo 11 store i16 %1, i16* @foo
12 ret void 12 ret void
13 } 13 }
14 14
15 define void @add() nounwind { 15 define void @add() nounwind {
16 ; CHECK-LABEL: add: 16 ; CHECK-LABEL: add:
17 ; CHECK: add.w &bar, &foo 17 ; CHECK: add.w &bar, &foo
18 %1 = load i16* @bar 18 %1 = load i16, i16* @bar
19 %2 = load i16* @foo 19 %2 = load i16, i16* @foo
20 %3 = add i16 %2, %1 20 %3 = add i16 %2, %1
21 store i16 %3, i16* @foo 21 store i16 %3, i16* @foo
22 ret void 22 ret void
23 } 23 }
24 24
25 define void @and() nounwind { 25 define void @and() nounwind {
26 ; CHECK-LABEL: and: 26 ; CHECK-LABEL: and:
27 ; CHECK: and.w &bar, &foo 27 ; CHECK: and.w &bar, &foo
28 %1 = load i16* @bar 28 %1 = load i16, i16* @bar
29 %2 = load i16* @foo 29 %2 = load i16, i16* @foo
30 %3 = and i16 %2, %1 30 %3 = and i16 %2, %1
31 store i16 %3, i16* @foo 31 store i16 %3, i16* @foo
32 ret void 32 ret void
33 } 33 }
34 34
35 define void @bis() nounwind { 35 define void @bis() nounwind {
36 ; CHECK-LABEL: bis: 36 ; CHECK-LABEL: bis:
37 ; CHECK: bis.w &bar, &foo 37 ; CHECK: bis.w &bar, &foo
38 %1 = load i16* @bar 38 %1 = load i16, i16* @bar
39 %2 = load i16* @foo 39 %2 = load i16, i16* @foo
40 %3 = or i16 %2, %1 40 %3 = or i16 %2, %1
41 store i16 %3, i16* @foo 41 store i16 %3, i16* @foo
42 ret void 42 ret void
43 } 43 }
44 44
45 define void @xor() nounwind { 45 define void @xor() nounwind {
46 ; CHECK-LABEL: xor: 46 ; CHECK-LABEL: xor:
47 ; CHECK: xor.w &bar, &foo 47 ; CHECK: xor.w &bar, &foo
48 %1 = load i16* @bar 48 %1 = load i16, i16* @bar
49 %2 = load i16* @foo 49 %2 = load i16, i16* @foo
50 %3 = xor i16 %2, %1 50 %3 = xor i16 %2, %1
51 store i16 %3, i16* @foo 51 store i16 %3, i16* @foo
52 ret void 52 ret void
53 } 53 }
54 54
56 entry: 56 entry:
57 %retval = alloca i16 ; <i16*> [#uses=3] 57 %retval = alloca i16 ; <i16*> [#uses=3]
58 %x = alloca i32, align 2 ; <i32*> [#uses=1] 58 %x = alloca i32, align 2 ; <i32*> [#uses=1]
59 %y = alloca i32, align 2 ; <i32*> [#uses=1] 59 %y = alloca i32, align 2 ; <i32*> [#uses=1]
60 store i16 0, i16* %retval 60 store i16 0, i16* %retval
61 %tmp = load i32* %y ; <i32> [#uses=1] 61 %tmp = load i32, i32* %y ; <i32> [#uses=1]
62 store i32 %tmp, i32* %x 62 store i32 %tmp, i32* %x
63 store i16 0, i16* %retval 63 store i16 0, i16* %retval
64 %0 = load i16* %retval ; <i16> [#uses=1] 64 %0 = load i16, i16* %retval ; <i16> [#uses=1]
65 ret i16 %0 65 ret i16 %0
66 ; CHECK-LABEL: mov2: 66 ; CHECK-LABEL: mov2:
67 ; CHECK: mov.w 2(r1), 6(r1) 67 ; CHECK: mov.w 2(r1), 6(r1)
68 ; CHECK: mov.w 0(r1), 4(r1) 68 ; CHECK: mov.w 0(r1), 4(r1)
69 } 69 }