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 i16 0, align 2 5 6define void @mov(i16 %a) nounwind { 7; CHECK: mov: 8; CHECK: mov.w r15, &foo 9 store i16 %a, i16* @foo 10 ret void 11} 12 13define void @add(i16 %a) nounwind { 14; CHECK: add: 15; CHECK: add.w r15, &foo 16 %1 = load i16* @foo 17 %2 = add i16 %a, %1 18 store i16 %2, i16* @foo 19 ret void 20} 21 22define void @and(i16 %a) nounwind { 23; CHECK: and: 24; CHECK: and.w r15, &foo 25 %1 = load i16* @foo 26 %2 = and i16 %a, %1 27 store i16 %2, i16* @foo 28 ret void 29} 30 31define void @bis(i16 %a) nounwind { 32; CHECK: bis: 33; CHECK: bis.w r15, &foo 34 %1 = load i16* @foo 35 %2 = or i16 %a, %1 36 store i16 %2, i16* @foo 37 ret void 38} 39 40define void @bic(i16 zeroext %m) nounwind { 41; CHECK: bic: 42; CHECK: bic.w r15, &foo 43 %1 = xor i16 %m, -1 44 %2 = load i16* @foo 45 %3 = and i16 %2, %1 46 store i16 %3, i16* @foo 47 ret void 48} 49 50define void @xor(i16 %a) nounwind { 51; CHECK: xor: 52; CHECK: xor.w r15, &foo 53 %1 = load i16* @foo 54 %2 = xor i16 %a, %1 55 store i16 %2, i16* @foo 56 ret void 57} 58 59