~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/MSP430/Inst16mi.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-LABEL: 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-LABEL: add:
 
16
; CHECK: add.w  #2, &foo
 
17
        %1 = load i16, 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-LABEL: and:
 
25
; CHECK: and.w  #2, &foo
 
26
        %1 = load i16, 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-LABEL: bis:
 
34
; CHECK: bis.w  #2, &foo
 
35
        %1 = load i16, 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-LABEL: xor:
 
43
; CHECK: xor.w  #2, &foo
 
44
        %1 = load i16, i16* @foo
 
45
        %2 = xor i16 %1, 2
 
46
        store i16 %2, i16 * @foo
 
47
        ret void
 
48
}