1; RUN: llc < %s -mtriple armv8a--none-eabi -mattr=+fullfp16             | FileCheck %s
2; RUN: llc < %s -mtriple armv8a--none-eabi -mattr=+fullfp16,+thumb-mode | FileCheck %s
3
4; Check that frame lowering for the fp16 instructions works correctly with
5; negative offsets (which happens when using the frame pointer).
6
7define void @foo(i32 %count) {
8entry:
9  %half_alloca = alloca half, align 2
10; CHECK: vstr.16 {{s[0-9]+}}, [{{r[0-9]+}}, #-10]
11  store half 0.0, half* %half_alloca
12  call void @bar(half* %half_alloca)
13
14  ; A variable-sized alloca to force the above store to use the frame pointer
15  ; instead of the stack pointer, and so need a negative offset.
16  %var_alloca = alloca i32, i32 %count
17  call void @baz(i32* %var_alloca)
18  ret void
19}
20
21declare void @bar(half*)
22declare void @baz(i32*)
23