From bcfd12a2344e2fc385847aef1ed722a667bcd1f9 Mon Sep 17 00:00:00 2001 From: Sanjiv Gupta Date: Sat, 19 Dec 2009 13:52:01 +0000 Subject: [PATCH] Emit direction operand in binary insns that stores in memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91777 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PIC16/PIC16InstrInfo.td | 2 +- test/CodeGen/PIC16/result_direction.ll | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 test/CodeGen/PIC16/result_direction.ll diff --git a/lib/Target/PIC16/PIC16InstrInfo.td b/lib/Target/PIC16/PIC16InstrInfo.td index 5eec6c4e66b..bf4baf39402 100644 --- a/lib/Target/PIC16/PIC16InstrInfo.td +++ b/lib/Target/PIC16/PIC16InstrInfo.td @@ -151,7 +151,7 @@ let mayStore = 1 in class BinOpWF OpCode, string OpcStr, SDNode OpNode>: ByteFormat [#uses=2] + +define void @foo() nounwind { +entry: + %tmp = load i16* @a ; [#uses=1] + %add = add nsw i16 %tmp, 1 ; [#uses=1] + store i16 %add, i16* @a +;CHECK: movlw 1 +;CHECK: addwf @a + 0, F + ret void +}