1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs -global-isel -global-isel-abort=1 %s -o - | FileCheck %s
4 declare i64 @llvm.get.fpenv.i64()
5 declare void @llvm.set.fpenv.i64(i64 %fpenv)
6 declare void @llvm.reset.fpenv()
8 define i64 @get_fpenv_01() nounwind {
9 ; CHECK-LABEL: get_fpenv_01:
10 ; CHECK: // %bb.0: // %entry
11 ; CHECK-NEXT: str x30, [sp, #-16]! // 8-byte Folded Spill
12 ; CHECK-NEXT: add x0, sp, #8
13 ; CHECK-NEXT: bl fegetenv
14 ; CHECK-NEXT: ldr x0, [sp, #8]
15 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
18 %fpenv = call i64 @llvm.get.fpenv.i64()
22 define void @set_fpenv_01(i64 %fpenv) nounwind {
23 ; CHECK-LABEL: set_fpenv_01:
24 ; CHECK: // %bb.0: // %entry
25 ; CHECK-NEXT: stp x30, x0, [sp, #-16]! // 8-byte Folded Spill
26 ; CHECK-NEXT: add x0, sp, #8
27 ; CHECK-NEXT: bl fesetenv
28 ; CHECK-NEXT: ldr x30, [sp], #16 // 8-byte Folded Reload
31 call void @llvm.set.fpenv.i64(i64 %fpenv)
35 define void @reset_fpenv_01() nounwind {
36 ; CHECK-LABEL: reset_fpenv_01:
37 ; CHECK: // %bb.0: // %entry
38 ; CHECK-NEXT: mov x0, #-1 // =0xffffffffffffffff
39 ; CHECK-NEXT: b fesetenv
41 call void @llvm.reset.fpenv()