[PATCH] D78459: [AVR] Don't adjust for instruction size

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 14 09:36:34 PDT 2020


aykevl added a comment.

I'm trying to make a test case, but I'm not sure how to do it. I have converted the test to IR here: https://gist.github.com/aykevl/08e87000370d0f7ed7780932b32d7924
The difference in disassembly output is only visible when disassembling the instructions (not just the instruction encodings), and `llvm-objdump` doesn't yet support 32-bit AVR instructions. Therefore the output is the same with or without this patch:

  00000000 <foo>:
  		...
       800: 00 00                        	nop
       802: 0e 94 00 00                  	<unknown>
       806: 0d 94 00 00                  	<unknown>

`avr-objdump` shows the bug, this is without the patch applied:

  00000000 <foo>:
  	...
   800:	00 00       	nop
   802:	0e 94 00 00 	call	0	; 0x0 <foo>
   806:	0d 94 00 00 	jmp	0x20000	; 0x20000 <foo+0x20000>

Any idea how to proceed?

In D78459#2091779 <https://reviews.llvm.org/D78459#2091779>, @dylanmckay wrote:

> Also, you may already know about it but if not, the LLVM bugpoint tool can usually heavily reduce testcase size. I usually get 99% cutdown from some of the larger IR files. If the file must be large though, it must be large (as some tests are) so let's add it anyway.


Yes I'm aware of bugpoint (I've used it often to reduce test cases). Unfortunately the bug is only triggered on long branches, so I don't think it's possible to avoid it in this case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78459/new/

https://reviews.llvm.org/D78459





More information about the llvm-commits mailing list