Anton Korobeynikov | 1bb755c | 2009-10-11 23:03:28 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | llc -march=msp430 | 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 | |
| 5 | @foo = common global i8 0, align 1 |
| 6 | @bar = common global i8 0, align 1 |
| 7 | |
| 8 | define void @add() nounwind { |
| 9 | ; CHECK: add: |
| 10 | ; CHECK: add.b &bar, &foo |
| 11 | %1 = load i8* @bar |
| 12 | %2 = load i8* @foo |
| 13 | %3 = add i8 %2, %1 |
| 14 | store i8 %3, i8* @foo |
| 15 | ret void |
| 16 | } |
| 17 | |
| 18 | define void @and() nounwind { |
| 19 | ; CHECK: and: |
| 20 | ; CHECK: and.b &bar, &foo |
| 21 | %1 = load i8* @bar |
| 22 | %2 = load i8* @foo |
| 23 | %3 = and i8 %2, %1 |
| 24 | store i8 %3, i8* @foo |
| 25 | ret void |
| 26 | } |
| 27 | |
| 28 | define void @bis() nounwind { |
| 29 | ; CHECK: bis: |
| 30 | ; CHECK: bis.b &bar, &foo |
| 31 | %1 = load i8* @bar |
| 32 | %2 = load i8* @foo |
| 33 | %3 = or i8 %2, %1 |
| 34 | store i8 %3, i8* @foo |
| 35 | ret void |
| 36 | } |
| 37 | |
| 38 | define void @xor() nounwind { |
| 39 | ; CHECK: xor: |
| 40 | ; CHECK: xor.b &bar, &foo |
| 41 | %1 = load i8* @bar |
| 42 | %2 = load i8* @foo |
| 43 | %3 = xor i8 %2, %1 |
| 44 | store i8 %3, i8* @foo |
| 45 | ret void |
| 46 | } |
| 47 | |