Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/X86/win32-int-runtime-libcalls.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

114 lines
3.3 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=i686-windows-msvc < %s | FileCheck -check-prefix=CHECK32 %s
; RUN: llc -mtriple=x86_64-windows-msvc < %s | FileCheck -check-prefix=CHECK64 %s
define i64 @test_sdiv_i64(i64 %a, i64 %b) {
; CHECK32-LABEL: test_sdiv_i64:
; CHECK32: # %bb.0:
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: calll __alldiv
; CHECK32-NEXT: retl
;
; CHECK64-LABEL: test_sdiv_i64:
; CHECK64: # %bb.0:
; CHECK64-NEXT: movq %rdx, %r8
; CHECK64-NEXT: movq %rcx, %rax
; CHECK64-NEXT: cqto
; CHECK64-NEXT: idivq %r8
; CHECK64-NEXT: retq
%ret = sdiv i64 %a, %b
ret i64 %ret
}
define i64 @test_srem_i64(i64 %a, i64 %b) {
; CHECK32-LABEL: test_srem_i64:
; CHECK32: # %bb.0:
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: calll __allrem
; CHECK32-NEXT: retl
;
; CHECK64-LABEL: test_srem_i64:
; CHECK64: # %bb.0:
; CHECK64-NEXT: movq %rdx, %r8
; CHECK64-NEXT: movq %rcx, %rax
; CHECK64-NEXT: cqto
; CHECK64-NEXT: idivq %r8
; CHECK64-NEXT: movq %rdx, %rax
; CHECK64-NEXT: retq
%ret = srem i64 %a, %b
ret i64 %ret
}
define i64 @test_udiv_i64(i64 %a, i64 %b) {
; CHECK32-LABEL: test_udiv_i64:
; CHECK32: # %bb.0:
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: calll __aulldiv
; CHECK32-NEXT: retl
;
; CHECK64-LABEL: test_udiv_i64:
; CHECK64: # %bb.0:
; CHECK64-NEXT: movq %rdx, %r8
; CHECK64-NEXT: movq %rcx, %rax
; CHECK64-NEXT: xorl %edx, %edx
; CHECK64-NEXT: divq %r8
; CHECK64-NEXT: retq
%ret = udiv i64 %a, %b
ret i64 %ret
}
define i64 @test_urem_i64(i64 %a, i64 %b) {
; CHECK32-LABEL: test_urem_i64:
; CHECK32: # %bb.0:
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: pushl {{[0-9]+}}(%esp)
; CHECK32-NEXT: calll __aullrem
; CHECK32-NEXT: retl
;
; CHECK64-LABEL: test_urem_i64:
; CHECK64: # %bb.0:
; CHECK64-NEXT: movq %rdx, %r8
; CHECK64-NEXT: movq %rcx, %rax
; CHECK64-NEXT: xorl %edx, %edx
; CHECK64-NEXT: divq %r8
; CHECK64-NEXT: movq %rdx, %rax
; CHECK64-NEXT: retq
%ret = urem i64 %a, %b
ret i64 %ret
}
define i64 @test_mul_i64(i64 %a, i64 %b) {
; CHECK32-LABEL: test_mul_i64:
; CHECK32: # %bb.0:
; CHECK32-NEXT: pushl %esi
; CHECK32-NEXT: movl {{[0-9]+}}(%esp), %ecx
; CHECK32-NEXT: movl {{[0-9]+}}(%esp), %esi
; CHECK32-NEXT: movl %ecx, %eax
; CHECK32-NEXT: mull %esi
; CHECK32-NEXT: imull {{[0-9]+}}(%esp), %ecx
; CHECK32-NEXT: addl %ecx, %edx
; CHECK32-NEXT: imull {{[0-9]+}}(%esp), %esi
; CHECK32-NEXT: addl %esi, %edx
; CHECK32-NEXT: popl %esi
; CHECK32-NEXT: retl
;
; CHECK64-LABEL: test_mul_i64:
; CHECK64: # %bb.0:
; CHECK64-NEXT: movq %rcx, %rax
; CHECK64-NEXT: imulq %rdx, %rax
; CHECK64-NEXT: retq
%ret = mul i64 %a, %b
ret i64 %ret
}