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