brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · b185d9e Raw
69 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 22; RUN: llc -mtriple=aarch64-none-linux-gnu %s -o - | FileCheck --check-prefix=DAG %s3; RUN: llc -mtriple=aarch64-none-linux-gnu -global-isel %s -o - | FileCheck --check-prefix=GIS %s4 5declare i32 @llvm.get.fpmode.i32()6declare void @llvm.set.fpmode.i32(i32 %fpmode)7declare void @llvm.reset.fpmode()8 9define i32 @func_get_fpmode() #0 {10; DAG-LABEL: func_get_fpmode:11; DAG:       // %bb.0: // %entry12; DAG-NEXT:    mrs x0, FPCR13; DAG-NEXT:    // kill: def $w0 killed $w0 killed $x014; DAG-NEXT:    ret15;16; GIS-LABEL: func_get_fpmode:17; GIS:       // %bb.0: // %entry18; GIS-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill19; GIS-NEXT:    add x0, sp, #1220; GIS-NEXT:    bl fegetmode21; GIS-NEXT:    ldr w0, [sp, #12]22; GIS-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload23; GIS-NEXT:    ret24entry:25  %fpmode = call i32 @llvm.get.fpmode.i32()26  ret i32 %fpmode27}28 29define void @func_set_fpmode(i32 %fpmode) #0 {30; DAG-LABEL: func_set_fpmode:31; DAG:       // %bb.0: // %entry32; DAG-NEXT:    mov w8, w033; DAG-NEXT:    msr FPCR, x834; DAG-NEXT:    ret35;36; GIS-LABEL: func_set_fpmode:37; GIS:       // %bb.0: // %entry38; GIS-NEXT:    str x30, [sp, #-16]! // 8-byte Folded Spill39; GIS-NEXT:    str w0, [sp, #12]40; GIS-NEXT:    add x0, sp, #1241; GIS-NEXT:    bl fesetmode42; GIS-NEXT:    ldr x30, [sp], #16 // 8-byte Folded Reload43; GIS-NEXT:    ret44entry:45  call void @llvm.set.fpmode.i32(i32 %fpmode)46  ret void47}48 49define void @func_reset_fpmode() #0 {50; DAG-LABEL: func_reset_fpmode:51; DAG:       // %bb.0: // %entry52; DAG-NEXT:    mov x9, #-48904 // =0xffffffffffff40f853; DAG-NEXT:    mrs x8, FPCR54; DAG-NEXT:    movk x9, #63488, lsl #1655; DAG-NEXT:    and x8, x8, x956; DAG-NEXT:    msr FPCR, x857; DAG-NEXT:    ret58;59; GIS-LABEL: func_reset_fpmode:60; GIS:       // %bb.0: // %entry61; GIS-NEXT:    mov x0, #-1 // =0xffffffffffffffff62; GIS-NEXT:    b fesetmode63entry:64  call void @llvm.reset.fpmode()65  ret void66}67 68attributes #0 = { nounwind }69