31 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=avr -mattr=-eijmpcall | FileCheck %s --check-prefix=ICALL3; RUN: llc < %s -mtriple=avr -mattr=+eijmpcall | FileCheck %s --check-prefix=EICALL4 5; This test verifies the bug https://github.com/llvm/llvm-project/issues/588566 7declare dso_local i16 @func()8 9define i16 @foo() {10; ICALL-LABEL: foo:11; ICALL: ; %bb.0:12; ICALL-NEXT: ldi r30, pm_lo8(func)13; ICALL-NEXT: ldi r31, pm_hi8(func)14; ICALL-NEXT: ;APP15; ICALL-NEXT: ;NO_APP16; ICALL-NEXT: icall17; ICALL-NEXT: ret18;19; EICALL-LABEL: foo:20; EICALL: ; %bb.0:21; EICALL-NEXT: ldi r30, lo8_gs(func)22; EICALL-NEXT: ldi r31, hi8_gs(func)23; EICALL-NEXT: ;APP24; EICALL-NEXT: ;NO_APP25; EICALL-NEXT: eicall26; EICALL-NEXT: ret27 %1 = tail call addrspace(0) ptr addrspace(1) asm "", "=r,0"(ptr addrspace(1) @func)28 %2 = tail call i16 %1()29 ret i16 %230}31