1 ; RUN: llc < %s -march=avr | FileCheck --check-prefixes=CHECK,NOSECTIONS %s
2 ; RUN: llc -function-sections -data-sections < %s -march=avr | FileCheck --check-prefixes=CHECK,SECTIONS %s
4 ; Test that functions (in address space 1) are not considered .progmem data.
7 ; SECTIONS: .text.somefunc,"ax",@progbits
8 ; CHECK-LABEL: somefunc:
9 define void @somefunc() addrspace(1) {
14 ; Test whether global variables are placed in the correct section.
16 ; Note: avr-gcc would place this global in .progmem.data.flash with
17 ; -fdata-sections. The AVR backend does not yet respect -fdata-sections in this
19 ; CHECK: .section .progmem.data,"a",@progbits
21 @flash = addrspace(1) constant i16 3
23 ; NOSECTIONS: .section .rodata,"a",@progbits
24 ; SECTIONS: .section .rodata.ram1,"a",@progbits
26 @ram1 = constant i16 3
29 ; SECTIONS: .section .data.ram2,"aw",@progbits