Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/RISCV/csr-first-use-cost.ll
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

108 lines
4.2 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=riscv64 -regalloc-csr-first-time-cost=0 < %s | FileCheck %s -check-prefix=ZERO-COST
; RUN: llc -mtriple=riscv64 < %s | FileCheck %s -check-prefix=DEFAULT-COST
define fastcc void @Perl_sv_setnv(i8 %c, ptr %.str.54.3682) nounwind {
; ZERO-COST-LABEL: Perl_sv_setnv:
; ZERO-COST: # %bb.0: # %entry
; ZERO-COST-NEXT: addi sp, sp, -32
; ZERO-COST-NEXT: sd ra, 24(sp) # 8-byte Folded Spill
; ZERO-COST-NEXT: sd s0, 16(sp) # 8-byte Folded Spill
; ZERO-COST-NEXT: sd s1, 8(sp) # 8-byte Folded Spill
; ZERO-COST-NEXT: zext.b a0, a0
; ZERO-COST-NEXT: li a2, 2
; ZERO-COST-NEXT: blt a2, a0, .LBB0_3
; ZERO-COST-NEXT: # %bb.1: # %entry
; ZERO-COST-NEXT: beqz a0, .LBB0_4
; ZERO-COST-NEXT: # %bb.2: # %entry
; ZERO-COST-NEXT: mv s0, a1
; ZERO-COST-NEXT: li a1, 1
; ZERO-COST-NEXT: beq a0, a1, .LBB0_6
; ZERO-COST-NEXT: j .LBB0_7
; ZERO-COST-NEXT: .LBB0_3: # %entry
; ZERO-COST-NEXT: li a2, 3
; ZERO-COST-NEXT: bne a0, a2, .LBB0_5
; ZERO-COST-NEXT: .LBB0_4: # %sw.bb3
; ZERO-COST-NEXT: ld ra, 24(sp) # 8-byte Folded Reload
; ZERO-COST-NEXT: ld s0, 16(sp) # 8-byte Folded Reload
; ZERO-COST-NEXT: ld s1, 8(sp) # 8-byte Folded Reload
; ZERO-COST-NEXT: addi sp, sp, 32
; ZERO-COST-NEXT: ret
; ZERO-COST-NEXT: .LBB0_5: # %entry
; ZERO-COST-NEXT: mv s0, a1
; ZERO-COST-NEXT: li a1, 12
; ZERO-COST-NEXT: bne a0, a1, .LBB0_7
; ZERO-COST-NEXT: .LBB0_6: # %sw.bb34.i
; ZERO-COST-NEXT: li s0, 0
; ZERO-COST-NEXT: .LBB0_7: # %Perl_sv_reftype.exit
; ZERO-COST-NEXT: li s1, 0
; ZERO-COST-NEXT: li a0, 0
; ZERO-COST-NEXT: li a1, 0
; ZERO-COST-NEXT: jalr s1
; ZERO-COST-NEXT: li a0, 0
; ZERO-COST-NEXT: mv a1, s0
; ZERO-COST-NEXT: li a2, 0
; ZERO-COST-NEXT: jalr s1
;
; DEFAULT-COST-LABEL: Perl_sv_setnv:
; DEFAULT-COST: # %bb.0: # %entry
; DEFAULT-COST-NEXT: addi sp, sp, -32
; DEFAULT-COST-NEXT: sd ra, 24(sp) # 8-byte Folded Spill
; DEFAULT-COST-NEXT: sd s0, 16(sp) # 8-byte Folded Spill
; DEFAULT-COST-NEXT: zext.b a0, a0
; DEFAULT-COST-NEXT: li a2, 2
; DEFAULT-COST-NEXT: blt a2, a0, .LBB0_3
; DEFAULT-COST-NEXT: # %bb.1: # %entry
; DEFAULT-COST-NEXT: beqz a0, .LBB0_4
; DEFAULT-COST-NEXT: # %bb.2: # %entry
; DEFAULT-COST-NEXT: sd a1, 8(sp) # 8-byte Folded Spill
; DEFAULT-COST-NEXT: li a1, 1
; DEFAULT-COST-NEXT: beq a0, a1, .LBB0_6
; DEFAULT-COST-NEXT: j .LBB0_7
; DEFAULT-COST-NEXT: .LBB0_3: # %entry
; DEFAULT-COST-NEXT: li a2, 3
; DEFAULT-COST-NEXT: bne a0, a2, .LBB0_5
; DEFAULT-COST-NEXT: .LBB0_4: # %sw.bb3
; DEFAULT-COST-NEXT: ld ra, 24(sp) # 8-byte Folded Reload
; DEFAULT-COST-NEXT: ld s0, 16(sp) # 8-byte Folded Reload
; DEFAULT-COST-NEXT: addi sp, sp, 32
; DEFAULT-COST-NEXT: ret
; DEFAULT-COST-NEXT: .LBB0_5: # %entry
; DEFAULT-COST-NEXT: sd a1, 8(sp) # 8-byte Folded Spill
; DEFAULT-COST-NEXT: li a1, 12
; DEFAULT-COST-NEXT: bne a0, a1, .LBB0_7
; DEFAULT-COST-NEXT: .LBB0_6: # %sw.bb34.i
; DEFAULT-COST-NEXT: sd zero, 8(sp) # 8-byte Folded Spill
; DEFAULT-COST-NEXT: .LBB0_7: # %Perl_sv_reftype.exit
; DEFAULT-COST-NEXT: li s0, 0
; DEFAULT-COST-NEXT: li a0, 0
; DEFAULT-COST-NEXT: li a1, 0
; DEFAULT-COST-NEXT: jalr s0
; DEFAULT-COST-NEXT: li a0, 0
; DEFAULT-COST-NEXT: ld a1, 8(sp) # 8-byte Folded Reload
; DEFAULT-COST-NEXT: li a2, 0
; DEFAULT-COST-NEXT: jalr s0
entry:
switch i8 %c, label %Perl_sv_reftype.exit [
i8 1, label %sw.bb4
i8 12, label %sw.bb34.i
i8 3, label %sw.bb3
i8 0, label %sw.bb3
]
sw.bb3: ; preds = %entry, %entry
ret void
sw.bb4: ; preds = %entry
br label %Perl_sv_reftype.exit
sw.bb34.i: ; preds = %entry
br label %Perl_sv_reftype.exit
Perl_sv_reftype.exit: ; preds = %sw.bb34.i, %sw.bb4, %entry
%retval.0.i = phi ptr [ null, %sw.bb34.i ], [ null, %sw.bb4 ], [ %.str.54.3682, %entry ]
%call17 = tail call fastcc i64 null(ptr null, i32 0)
tail call void (ptr, ...) null(ptr null, ptr %retval.0.i, ptr null)
unreachable
}