1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+zfh -verify-machineinstrs \
3 ; RUN: -target-abi ilp32f < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+zfh -verify-machineinstrs \
5 ; RUN: -target-abi lp64f < %s | FileCheck %s
7 ; TODO: constant pool shouldn't be necessary for RV32IZfh and RV64IZfh
8 define half @half_imm() nounwind {
9 ; CHECK-LABEL: half_imm:
11 ; CHECK-NEXT: lui a0, %hi(.LCPI0_0)
12 ; CHECK-NEXT: flh fa0, %lo(.LCPI0_0)(a0)
17 define half @half_imm_op(half %a) nounwind {
18 ; CHECK-LABEL: half_imm_op:
20 ; CHECK-NEXT: lui a0, %hi(.LCPI1_0)
21 ; CHECK-NEXT: flh ft0, %lo(.LCPI1_0)(a0)
22 ; CHECK-NEXT: fadd.h fa0, fa0, ft0
24 %1 = fadd half %a, 1.0