2009-10-12 17:31:55 +08:00
|
|
|
; RUN: llc -march=msp430 < %s | FileCheck %s
|
2009-10-12 07:03:28 +08:00
|
|
|
target datalayout = "e-p:16:8:8-i8:8:8-i16:8:8-i32:8:8"
|
|
|
|
target triple = "msp430-generic-generic"
|
|
|
|
|
|
|
|
@foo = common global i8 0, align 1
|
|
|
|
@bar = common global i8 0, align 1
|
|
|
|
|
2009-10-12 07:03:53 +08:00
|
|
|
define void @mov() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: mov:
|
2009-10-12 07:03:53 +08:00
|
|
|
; CHECK: mov.b &bar, &foo
|
2015-02-28 05:17:42 +08:00
|
|
|
%1 = load i8, i8* @bar
|
2009-10-12 07:03:53 +08:00
|
|
|
store i8 %1, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2009-10-12 07:03:28 +08:00
|
|
|
define void @add() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: add:
|
2009-10-12 07:03:28 +08:00
|
|
|
; CHECK: add.b &bar, &foo
|
2015-02-28 05:17:42 +08:00
|
|
|
%1 = load i8, i8* @bar
|
|
|
|
%2 = load i8, i8* @foo
|
2009-10-12 07:03:28 +08:00
|
|
|
%3 = add i8 %2, %1
|
|
|
|
store i8 %3, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @and() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: and:
|
2009-10-12 07:03:28 +08:00
|
|
|
; CHECK: and.b &bar, &foo
|
2015-02-28 05:17:42 +08:00
|
|
|
%1 = load i8, i8* @bar
|
|
|
|
%2 = load i8, i8* @foo
|
2009-10-12 07:03:28 +08:00
|
|
|
%3 = and i8 %2, %1
|
|
|
|
store i8 %3, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @bis() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: bis:
|
2009-10-12 07:03:28 +08:00
|
|
|
; CHECK: bis.b &bar, &foo
|
2015-02-28 05:17:42 +08:00
|
|
|
%1 = load i8, i8* @bar
|
|
|
|
%2 = load i8, i8* @foo
|
2009-10-12 07:03:28 +08:00
|
|
|
%3 = or i8 %2, %1
|
|
|
|
store i8 %3, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
define void @xor() nounwind {
|
2013-07-14 14:24:09 +08:00
|
|
|
; CHECK-LABEL: xor:
|
2009-10-12 07:03:28 +08:00
|
|
|
; CHECK: xor.b &bar, &foo
|
2015-02-28 05:17:42 +08:00
|
|
|
%1 = load i8, i8* @bar
|
|
|
|
%2 = load i8, i8* @foo
|
2009-10-12 07:03:28 +08:00
|
|
|
%3 = xor i8 %2, %1
|
|
|
|
store i8 %3, i8* @foo
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|