brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.9 KiB · d2ecba2 Raw
91 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 22; RUN: llc -mtriple=riscv32 -mattr=+f,+zcmp -target-abi ilp32f -verify-machineinstrs < %s | FileCheck %s --check-prefix=RV323; RUN: llc -mtriple=riscv64 -mattr=+f,+zcmp -target-abi lp64f -verify-machineinstrs < %s | FileCheck %s --check-prefix=RV644 5declare void @callee()6 7; Test the file could be compiled successfully.8define float @foo(float %arg) {9; RV32-LABEL: foo:10; RV32:       # %bb.0: # %entry11; RV32-NEXT:    cm.push {ra}, -3212; RV32-NEXT:    .cfi_def_cfa_offset 3213; RV32-NEXT:    .cfi_offset ra, -414; RV32-NEXT:    fsw fs0, 12(sp) # 4-byte Folded Spill15; RV32-NEXT:    .cfi_offset fs0, -2016; RV32-NEXT:    fmv.s fs0, fa017; RV32-NEXT:    call callee18; RV32-NEXT:    fmv.s fa0, fs019; RV32-NEXT:    flw fs0, 12(sp) # 4-byte Folded Reload20; RV32-NEXT:    .cfi_restore fs021; RV32-NEXT:    cm.popret {ra}, 3222;23; RV64-LABEL: foo:24; RV64:       # %bb.0: # %entry25; RV64-NEXT:    cm.push {ra}, -3226; RV64-NEXT:    .cfi_def_cfa_offset 3227; RV64-NEXT:    .cfi_offset ra, -828; RV64-NEXT:    fsw fs0, 12(sp) # 4-byte Folded Spill29; RV64-NEXT:    .cfi_offset fs0, -2030; RV64-NEXT:    fmv.s fs0, fa031; RV64-NEXT:    call callee32; RV64-NEXT:    fmv.s fa0, fs033; RV64-NEXT:    flw fs0, 12(sp) # 4-byte Folded Reload34; RV64-NEXT:    .cfi_restore fs035; RV64-NEXT:    cm.popret {ra}, 3236entry:37  call void @callee()38  ret float %arg39}40 41define void @foo2(i32 %x, float %y) {42; RV32-LABEL: foo2:43; RV32:       # %bb.0: # %entry44; RV32-NEXT:    cm.push {ra, s0}, -3245; RV32-NEXT:    .cfi_def_cfa_offset 3246; RV32-NEXT:    .cfi_offset ra, -847; RV32-NEXT:    .cfi_offset s0, -448; RV32-NEXT:    fsw fs0, 12(sp) # 4-byte Folded Spill49; RV32-NEXT:    .cfi_offset fs0, -2050; RV32-NEXT:    fmv.s fs0, fa051; RV32-NEXT:    mv s0, a052; RV32-NEXT:    call bar53; RV32-NEXT:    mv a0, s054; RV32-NEXT:    fmv.s fa0, fs055; RV32-NEXT:    flw fs0, 12(sp) # 4-byte Folded Reload56; RV32-NEXT:    .cfi_restore fs057; RV32-NEXT:    cm.pop {ra, s0}, 3258; RV32-NEXT:    .cfi_restore ra59; RV32-NEXT:    .cfi_restore s060; RV32-NEXT:    .cfi_def_cfa_offset 061; RV32-NEXT:    tail func62;63; RV64-LABEL: foo2:64; RV64:       # %bb.0: # %entry65; RV64-NEXT:    cm.push {ra, s0}, -3266; RV64-NEXT:    .cfi_def_cfa_offset 3267; RV64-NEXT:    .cfi_offset ra, -1668; RV64-NEXT:    .cfi_offset s0, -869; RV64-NEXT:    fsw fs0, 12(sp) # 4-byte Folded Spill70; RV64-NEXT:    .cfi_offset fs0, -2071; RV64-NEXT:    fmv.s fs0, fa072; RV64-NEXT:    mv s0, a073; RV64-NEXT:    call bar74; RV64-NEXT:    mv a0, s075; RV64-NEXT:    fmv.s fa0, fs076; RV64-NEXT:    flw fs0, 12(sp) # 4-byte Folded Reload77; RV64-NEXT:    .cfi_restore fs078; RV64-NEXT:    cm.pop {ra, s0}, 3279; RV64-NEXT:    .cfi_restore ra80; RV64-NEXT:    .cfi_restore s081; RV64-NEXT:    .cfi_def_cfa_offset 082; RV64-NEXT:    tail func83entry:84  tail call void @bar()85  tail call void @func(i32 %x, float %y)86  ret void87}88 89declare void @bar()90declare void @func(i32, float)91