mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 22:07:27 +00:00
bcfd12a234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91777 91177308-0d34-0410-b5e6-96231b3b80d8
14 lines
377 B
LLVM
14 lines
377 B
LLVM
; RUN: llvm-as < %s | llc -march=pic16 | FileCheck %s
|
|
|
|
@a = common global i16 0, align 1 ; <i16*> [#uses=2]
|
|
|
|
define void @foo() nounwind {
|
|
entry:
|
|
%tmp = load i16* @a ; <i16> [#uses=1]
|
|
%add = add nsw i16 %tmp, 1 ; <i16> [#uses=1]
|
|
store i16 %add, i16* @a
|
|
;CHECK: movlw 1
|
|
;CHECK: addwf @a + 0, F
|
|
ret void
|
|
}
|