Home | History | Annotate | Download | only in MSP430
      1 ; RUN: llc -march=msp430 < %s | FileCheck %s
      2 target datalayout = "e-p:16:8:8-i8:8:8-i8:8:8-i32:8:8"
      3 target triple = "msp430-generic-generic"
      4 @foo = common global i8 0, align 1
      5 
      6 define i8 @add(i8 %a) nounwind {
      7 ; CHECK-LABEL: add:
      8 ; CHECK: add.b	&foo, r15
      9 	%1 = load i8, i8* @foo
     10 	%2 = add i8 %a, %1
     11 	ret i8 %2
     12 }
     13 
     14 define i8 @and(i8 %a) nounwind {
     15 ; CHECK-LABEL: and:
     16 ; CHECK: and.b	&foo, r15
     17 	%1 = load i8, i8* @foo
     18 	%2 = and i8 %a, %1
     19 	ret i8 %2
     20 }
     21 
     22 define i8 @bis(i8 %a) nounwind {
     23 ; CHECK-LABEL: bis:
     24 ; CHECK: bis.b	&foo, r15
     25 	%1 = load i8, i8* @foo
     26 	%2 = or i8 %a, %1
     27 	ret i8 %2
     28 }
     29 
     30 define i8  @bic(i8 %a) nounwind {
     31 ; CHECK-LABEL: bic:
     32 ; CHECK: bic.b  &foo, r15
     33         %1 = load i8, i8* @foo
     34         %2 = xor i8 %1, -1
     35         %3 = and i8 %a, %2
     36         ret i8 %3
     37 }
     38 
     39 define i8 @xor(i8 %a) nounwind {
     40 ; CHECK-LABEL: xor:
     41 ; CHECK: xor.b	&foo, r15
     42 	%1 = load i8, i8* @foo
     43 	%2 = xor i8 %a, %1
     44 	ret i8 %2
     45 }
     46 
     47