1; RUN: llc -march=msp430 < %s | FileCheck %s
2target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"
3target triple = "msp430-generic-generic"
4@foo = common global i8 0, align 1
5
6define void @mov(i8 %a) nounwind {
7; CHECK-LABEL: mov:
8; CHECK: mov.b	r15, &foo
9	store i8 %a, i8* @foo
10	ret void
11}
12
13define void @and(i8 %a) nounwind {
14; CHECK-LABEL: and:
15; CHECK: and.b	r15, &foo
16	%1 = load i8, i8* @foo
17	%2 = and i8 %a, %1
18	store i8 %2, i8* @foo
19	ret void
20}
21
22define void @add(i8 %a) nounwind {
23; CHECK-LABEL: add:
24; CHECK: add.b	r15, &foo
25	%1 = load i8, i8* @foo
26	%2 = add i8 %a, %1
27	store i8 %2, i8* @foo
28	ret void
29}
30
31define void @bis(i8 %a) nounwind {
32; CHECK-LABEL: bis:
33; CHECK: bis.b	r15, &foo
34	%1 = load i8, i8* @foo
35	%2 = or i8 %a, %1
36	store i8 %2, i8* @foo
37	ret void
38}
39
40define void @bic(i8 zeroext %m) nounwind {
41; CHECK-LABEL: bic:
42; CHECK: bic.b   r15, &foo
43        %1 = xor i8 %m, -1
44        %2 = load i8, i8* @foo
45        %3 = and i8 %2, %1
46        store i8 %3, i8* @foo
47        ret void
48}
49
50define void @xor(i8 %a) nounwind {
51; CHECK-LABEL: xor:
52; CHECK: xor.b	r15, &foo
53	%1 = load i8, i8* @foo
54	%2 = xor i8 %a, %1
55	store i8 %2, i8* @foo
56	ret void
57}
58
59