1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=armv8-unknown-linux-unknown -mattr=-fp16 -O0 < %s | FileCheck %s
4 declare fastcc half @getConstant()
6 declare fastcc i1 @isEqual(half %0, half %1)
8 define internal fastcc void @main() {
10 ; CHECK: @ %bb.0: @ %Entry
11 ; CHECK-NEXT: push {r11, lr}
12 ; CHECK-NEXT: mov r11, sp
13 ; CHECK-NEXT: sub sp, sp, #8
14 ; CHECK-NEXT: mov r0, #31744
15 ; CHECK-NEXT: strh r0, [r11, #-2]
16 ; CHECK-NEXT: ldrh r0, [r11, #-2]
17 ; CHECK-NEXT: vmov s0, r0
18 ; CHECK-NEXT: vstr s0, [sp] @ 4-byte Spill
19 ; CHECK-NEXT: bl getConstant
20 ; CHECK-NEXT: vmov.f32 s1, s0
21 ; CHECK-NEXT: vldr s0, [sp] @ 4-byte Reload
22 ; CHECK-NEXT: bl isEqual
23 ; CHECK-NEXT: mov sp, r11
24 ; CHECK-NEXT: pop {r11, pc}
26 ; First arg directly from constant
27 %const = alloca half, align 2
28 store half 0xH7C00, ptr %const, align 2
29 %arg1 = load half, ptr %const, align 2
30 ; Second arg from fucntion return
31 %arg2 = call fastcc half @getConstant()
32 ; Arguments should have equivalent mangling
33 %result = call fastcc i1 @isEqual(half %arg1, half %arg2)