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
49 lines
1.6 KiB
LLVM
49 lines
1.6 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
|
|
; RUN: llc --mtriple=loongarch64 -O3 < %s | FileCheck %s --check-prefix=DEFAULT
|
|
; RUN: llc --mtriple=loongarch64 -O3 -loongarch-disable-reloc-sched < %s | FileCheck %s --check-prefix=NOSCHED
|
|
|
|
@g = external global i32
|
|
|
|
define i32 @boundary_test(i32 %a, i32 %b) {
|
|
; DEFAULT-LABEL: boundary_test:
|
|
; DEFAULT: # %bb.0: # %entry
|
|
; DEFAULT-NEXT: pcalau12i $a2, %got_pc_hi20(g)
|
|
; DEFAULT-NEXT: ld.d $a2, $a2, %got_pc_lo12(g)
|
|
; DEFAULT-NEXT: mul.d $a3, $a0, $a1
|
|
; DEFAULT-NEXT: ld.w $a2, $a2, 0
|
|
; DEFAULT-NEXT: addi.w $a1, $a1, 0
|
|
; DEFAULT-NEXT: addi.w $a0, $a0, 0
|
|
; DEFAULT-NEXT: div.w $a0, $a0, $a1
|
|
; DEFAULT-NEXT: add.d $a0, $a3, $a0
|
|
; DEFAULT-NEXT: add.w $a0, $a0, $a2
|
|
; DEFAULT-NEXT: ret
|
|
;
|
|
; NOSCHED-LABEL: boundary_test:
|
|
; NOSCHED: # %bb.0: # %entry
|
|
; NOSCHED-NEXT: mul.d $a2, $a0, $a1
|
|
; NOSCHED-NEXT: pcalau12i $a3, %got_pc_hi20(g)
|
|
; NOSCHED-NEXT: ld.d $a3, $a3, %got_pc_lo12(g)
|
|
; NOSCHED-NEXT: ld.w $a3, $a3, 0
|
|
; NOSCHED-NEXT: addi.w $a1, $a1, 0
|
|
; NOSCHED-NEXT: addi.w $a0, $a0, 0
|
|
; NOSCHED-NEXT: div.w $a0, $a0, $a1
|
|
; NOSCHED-NEXT: add.d $a0, $a2, $a0
|
|
; NOSCHED-NEXT: add.w $a0, $a0, $a3
|
|
; NOSCHED-NEXT: ret
|
|
|
|
|
|
entry:
|
|
; Mul is fast, but without scheduling boundary it might be scheduled after the long latency load address setup
|
|
%x = mul i32 %a, %b
|
|
|
|
; Load global (pcalau12i) - this has target flags so it becomes a boundary with -loongarch-disable-reloc-sched
|
|
%v = load i32, ptr @g
|
|
|
|
; Div is slow
|
|
%y = sdiv i32 %a, %b
|
|
|
|
%s1 = add i32 %x, %y
|
|
%s2 = add i32 %s1, %v
|
|
ret i32 %s2
|
|
}
|