1; RUN: llc -mattr=lpm,lpmw < %s -march=avr | FileCheck %s 2 3@callbackPtr = common global void (i16) addrspace(1)* null, align 8 4@myValuePtr = common global i16* null, align 8 5 6@externalConstant = external global i16, align 2 7 8declare void @externalFunction(i16 signext) 9declare void @bar(i8 signext, void (i16)*, i16*) 10 11; CHECK-LABEL: loadCallbackPtr 12define void @loadCallbackPtr() { 13entry: 14 ; CHECK: ldi r{{[0-9]+}}, pm_lo8(externalFunction) 15 ; CHECK-NEXT: ldi r{{[0-9]+}}, pm_hi8(externalFunction) 16 store void (i16) addrspace(1)* @externalFunction, void (i16) addrspace(1)** @callbackPtr, align 8 17 ret void 18} 19 20; CHECK-LABEL: loadValuePtr 21define void @loadValuePtr() { 22entry: 23 ; CHECK: ldi r{{[0-9]+}}, lo8(externalConstant) 24 ; CHECK-NEXT: ldi r{{[0-9]+}}, hi8(externalConstant) 25 store i16* @externalConstant, i16** @myValuePtr, align 8 26 ret void 27} 28