summaryrefslogtreecommitdiff
path: root/test/CodeGen/PIC16/result_direction.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/PIC16/result_direction.ll')
-rw-r--r--test/CodeGen/PIC16/result_direction.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/PIC16/result_direction.ll b/test/CodeGen/PIC16/result_direction.ll
new file mode 100644
index 0000000000000..8549e21b3333e
--- /dev/null
+++ b/test/CodeGen/PIC16/result_direction.ll
@@ -0,0 +1,13 @@
+; 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
+}