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" 4 @foo = common global i16 0, align 2 5 6 define i16 @add(i16 %a) nounwind { 7 ; CHECK-LABEL: add: 8 ; CHECK: add.w &foo, r15 9 %1 = load i16* @foo 10 %2 = add i16 %a, %1 11 ret i16 %2 12 } 13 14 define i16 @and(i16 %a) nounwind { 15 ; CHECK-LABEL: and: 16 ; CHECK: and.w &foo, r15 17 %1 = load i16* @foo 18 %2 = and i16 %a, %1 19 ret i16 %2 20 } 21 22 define i16 @bis(i16 %a) nounwind { 23 ; CHECK-LABEL: bis: 24 ; CHECK: bis.w &foo, r15 25 %1 = load i16* @foo 26 %2 = or i16 %a, %1 27 ret i16 %2 28 } 29 30 define i16 @bic(i16 %a) nounwind { 31 ; CHECK-LABEL: bic: 32 ; CHECK: bic.w &foo, r15 33 %1 = load i16* @foo 34 %2 = xor i16 %1, -1 35 %3 = and i16 %a, %2 36 ret i16 %3 37 } 38 39 define i16 @xor(i16 %a) nounwind { 40 ; CHECK-LABEL: xor: 41 ; CHECK: xor.w &foo, r15 42 %1 = load i16* @foo 43 %2 = xor i16 %a, %1 44 ret i16 %2 45 } 46 47