xref: /llvm-project/llvm/test/CodeGen/AArch64/fast-isel-const-float.ll (revision 2b3becb41d2b3f2931f78643af23ce9a3842ab52)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=aarch64-none-linux-gnu -global-isel -verify-machineinstrs < %s | FileCheck %s --check-prefix=GISEL
3; RUN: llc -mtriple=aarch64-none-linux-gnu -fast-isel -verify-machineinstrs < %s | FileCheck %s --check-prefix=FISEL
4
5; float foo(void) { return float(2147483648); }
6define float @select_fp_const() {
7; CHECK-LABEL: select_opt4
8; CHECK: movi v0.2s, #79, lsl #24
9; GISEL-LABEL: select_fp_const:
10; GISEL:       // %bb.0: // %entry
11; GISEL-NEXT:    movi v0.2s, #79, lsl #24
12; GISEL-NEXT:    ret
13;
14; FISEL-LABEL: select_fp_const:
15; FISEL:       // %bb.0: // %entry
16; FISEL-NEXT:    adrp x8, .LCPI0_0
17; FISEL-NEXT:    ldr s0, [x8, :lo12:.LCPI0_0]
18; FISEL-NEXT:    ret
19entry:
20  ret float 0x41E0000000000000
21}
22