From 66500208a557f082453d138bf7c30e0c9edfa0a5 Mon Sep 17 00:00:00 2001 From: Sanjiv Gupta Date: Tue, 22 Dec 2009 14:25:37 +0000 Subject: While converting one of the operands to a memory operand, we need to check if it is Legal and does not result into a cyclic dep. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91904 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/PIC16/C16-49.ll | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/CodeGen/PIC16/C16-49.ll (limited to 'test/CodeGen/PIC16') diff --git a/test/CodeGen/PIC16/C16-49.ll b/test/CodeGen/PIC16/C16-49.ll new file mode 100644 index 0000000..e59800b --- /dev/null +++ b/test/CodeGen/PIC16/C16-49.ll @@ -0,0 +1,15 @@ +;RUN: llvm-as < %s | llc -march=pic16 + +@aa = global i16 55, align 1 ; [#uses=1] +@bb = global i16 44, align 1 ; [#uses=1] +@PORTD = external global i8 ; [#uses=1] + +define void @foo() nounwind { +entry: + %tmp = volatile load i16* @aa ; [#uses=1] + %tmp1 = volatile load i16* @bb ; [#uses=1] + %sub = sub i16 %tmp, %tmp1 ; [#uses=1] + %conv = trunc i16 %sub to i8 ; [#uses=1] + store i8 %conv, i8* @PORTD + ret void +} -- cgit v1.1