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 5@foo = common global i8 0, align 1 6@bar = common global i8 0, align 1 7 8define void @mov() nounwind { 9; CHECK-LABEL: mov: 10; CHECK: mov.b &bar, &foo 11 %1 = load i8, i8* @bar 12 store i8 %1, i8* @foo 13 ret void 14} 15 16define void @add() nounwind { 17; CHECK-LABEL: add: 18; CHECK: add.b &bar, &foo 19 %1 = load i8, i8* @bar 20 %2 = load i8, i8* @foo 21 %3 = add i8 %2, %1 22 store i8 %3, i8* @foo 23 ret void 24} 25 26define void @and() nounwind { 27; CHECK-LABEL: and: 28; CHECK: and.b &bar, &foo 29 %1 = load i8, i8* @bar 30 %2 = load i8, i8* @foo 31 %3 = and i8 %2, %1 32 store i8 %3, i8* @foo 33 ret void 34} 35 36define void @bis() nounwind { 37; CHECK-LABEL: bis: 38; CHECK: bis.b &bar, &foo 39 %1 = load i8, i8* @bar 40 %2 = load i8, i8* @foo 41 %3 = or i8 %2, %1 42 store i8 %3, i8* @foo 43 ret void 44} 45 46define void @xor() nounwind { 47; CHECK-LABEL: xor: 48; CHECK: xor.b &bar, &foo 49 %1 = load i8, i8* @bar 50 %2 = load i8, i8* @foo 51 %3 = xor i8 %2, %1 52 store i8 %3, i8* @foo 53 ret void 54} 55 56define void @cmp(i8* %g, i8* %i) { 57entry: 58; CHECK-LABEL: cmp: 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 66 67if.then: ; preds = %entry 68 store i8 0, i8* %g, align 2 69 br label %if.end 70 71if.end: ; preds = %if.then, %entry 72 ret void 73} 74