diff options
| author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-12-22 14:25:37 +0000 | 
|---|---|---|
| committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-12-22 14:25:37 +0000 | 
| commit | 8c5f05fcee5554bbfe343922972863c8418ead30 (patch) | |
| tree | b88a80f2c6677c160d349f90d93abcf8e66494ea /llvm/test/CodeGen/PIC16 | |
| parent | 8c89d59c82241dbfd6f3f8ebe40041adc7bd841d (diff) | |
| download | bcm5719-llvm-8c5f05fcee5554bbfe343922972863c8418ead30.tar.gz bcm5719-llvm-8c5f05fcee5554bbfe343922972863c8418ead30.zip  | |
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.
llvm-svn: 91904
Diffstat (limited to 'llvm/test/CodeGen/PIC16')
| -rw-r--r-- | llvm/test/CodeGen/PIC16/C16-49.ll | 15 | 
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/PIC16/C16-49.ll b/llvm/test/CodeGen/PIC16/C16-49.ll new file mode 100644 index 00000000000..e59800b9a92 --- /dev/null +++ b/llvm/test/CodeGen/PIC16/C16-49.ll @@ -0,0 +1,15 @@ +;RUN: llvm-as < %s | llc -march=pic16 + +@aa = global i16 55, align 1                      ; <i16*> [#uses=1] +@bb = global i16 44, align 1                      ; <i16*> [#uses=1] +@PORTD = external global i8                       ; <i8*> [#uses=1] + +define void @foo() nounwind { +entry: +  %tmp = volatile load i16* @aa                   ; <i16> [#uses=1] +  %tmp1 = volatile load i16* @bb                  ; <i16> [#uses=1] +  %sub = sub i16 %tmp, %tmp1                      ; <i16> [#uses=1] +  %conv = trunc i16 %sub to i8                    ; <i8> [#uses=1] +  store i8 %conv, i8* @PORTD +  ret void +}  | 

