1 ; RUN: llc -march=msp430 < %s | FileCheck %s
2 target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"
3 target triple = "msp430-generic-generic"
5 @foo = common global i8 0, align 1
6 @bar = common global i8 0, align 1
8 define void @mov() nounwind {
10 ; CHECK: mov.b &bar, &foo
11 %1 = load i8, i8* @bar
16 define void @add() nounwind {
18 ; CHECK: add.b &bar, &foo
19 %1 = load i8, i8* @bar
20 %2 = load i8, i8* @foo
26 define void @and() nounwind {
28 ; CHECK: and.b &bar, &foo
29 %1 = load i8, i8* @bar
30 %2 = load i8, i8* @foo
36 define void @bis() nounwind {
38 ; CHECK: bis.b &bar, &foo
39 %1 = load i8, i8* @bar
40 %2 = load i8, i8* @foo
46 define void @xor() nounwind {
48 ; CHECK: xor.b &bar, &foo
49 %1 = load i8, i8* @bar
50 %2 = load i8, i8* @foo
56 define void @cmp(i8* %g, i8* %i) {
59 ; CHECK: cmp.b 4(r12), 2(r13)
60 %add.ptr = getelementptr inbounds i8, i8* %g, i16 4
61 %0 = load i8, i8* %add.ptr, align 1
62 %add.ptr1 = getelementptr inbounds i8, i8* %i, i16 2
63 %1 = load i8, i8* %add.ptr1, align 1
64 %cmp = icmp sgt i8 %0, %1
65 br i1 %cmp, label %if.then, label %if.end
67 if.then: ; preds = %entry
68 store i8 0, i8* %g, align 2
71 if.end: ; preds = %if.then, %entry