[llvm-commits] [llvm] r91777 - in /llvm/trunk: lib/Target/PIC16/PIC16InstrInfo.td test/CodeGen/PIC16/result_direction.ll
Sanjiv Gupta
sanjiv.gupta at microchip.com
Sat Dec 19 05:52:02 PST 2009
Author: sgupta
Date: Sat Dec 19 07:52:01 2009
New Revision: 91777
URL: http://llvm.org/viewvc/llvm-project?rev=91777&view=rev
Log:
Emit direction operand in binary insns that stores in memory.
Added:
llvm/trunk/test/CodeGen/PIC16/result_direction.ll
Modified:
llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td
Modified: llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td?rev=91777&r1=91776&r2=91777&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16InstrInfo.td Sat Dec 19 07:52:01 2009
@@ -151,7 +151,7 @@
class BinOpWF<bits<6> OpCode, string OpcStr, SDNode OpNode>:
ByteFormat<OpCode, (outs),
(ins GPR:$src, i8imm:$offset, i8mem:$ptrlo, i8imm:$ptrhi),
- !strconcat(OpcStr, " $ptrlo + $offset"),
+ !strconcat(OpcStr, " $ptrlo + $offset, F"),
[(PIC16Store (OpNode GPR:$src, (PIC16Load diraddr:$ptrlo,
(i8 imm:$ptrhi),
(i8 imm:$offset))),
Added: llvm/trunk/test/CodeGen/PIC16/result_direction.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/PIC16/result_direction.ll?rev=91777&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/PIC16/result_direction.ll (added)
+++ llvm/trunk/test/CodeGen/PIC16/result_direction.ll Sat Dec 19 07:52:01 2009
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | llc -march=pic16 | FileCheck %s
+
+ at 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
+}
More information about the llvm-commits
mailing list