1 ; RUN: llc -mattr=lpm,lpmw < %s -march=avr | FileCheck %s
3 @callbackPtr = common global void (i16)* null, align 8
4 @myValuePtr = common global i16* null, align 8
6 @externalConstant = external global i16, align 2
8 declare void @externalFunction(i16 signext)
9 declare void @bar(i8 signext, void (i16)*, i16*)
11 ; CHECK-LABEL: loadCallbackPtr
12 define void @loadCallbackPtr() {
14 ; CHECK: ldi r{{[0-9]+}}, pm_lo8(externalFunction)
15 ; CHECK-NEXT: ldi r{{[0-9]+}}, pm_hi8(externalFunction)
16 store void (i16)* @externalFunction, void (i16)** @callbackPtr, align 8
20 ; CHECK-LABEL: loadValuePtr
21 define void @loadValuePtr() {
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