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
94 lines
3.0 KiB
LLVM
94 lines
3.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
|
|
%0 = type { i64, i64 }
|
|
%1 = type { i128, i1 }
|
|
|
|
; This used to call muloti4, but that won't link with libgcc.
|
|
define %0 @x(i64 %a.coerce0, i64 %a.coerce1, i64 %b.coerce0, i64 %b.coerce1) nounwind uwtable ssp {
|
|
; CHECK-LABEL: x:
|
|
; CHECK: ## %bb.0: ## %entry
|
|
; CHECK-NEXT: pushq %r14
|
|
; CHECK-NEXT: .cfi_def_cfa_offset 16
|
|
; CHECK-NEXT: pushq %rbx
|
|
; CHECK-NEXT: .cfi_def_cfa_offset 24
|
|
; CHECK-NEXT: .cfi_offset %rbx, -24
|
|
; CHECK-NEXT: .cfi_offset %r14, -16
|
|
; CHECK-NEXT: movq %rdx, %r9
|
|
; CHECK-NEXT: movq %rsi, %r8
|
|
; CHECK-NEXT: movq %rsi, %rbx
|
|
; CHECK-NEXT: sarq $63, %rbx
|
|
; CHECK-NEXT: imulq %rdx, %rbx
|
|
; CHECK-NEXT: movq %rdi, %rax
|
|
; CHECK-NEXT: mulq %rdx
|
|
; CHECK-NEXT: movq %rdx, %r10
|
|
; CHECK-NEXT: movq %rax, %rsi
|
|
; CHECK-NEXT: movq %r8, %rax
|
|
; CHECK-NEXT: mulq %r9
|
|
; CHECK-NEXT: movq %rdx, %r9
|
|
; CHECK-NEXT: movq %rax, %r11
|
|
; CHECK-NEXT: addq %r10, %r11
|
|
; CHECK-NEXT: adcq %rbx, %r9
|
|
; CHECK-NEXT: movq %r9, %rbx
|
|
; CHECK-NEXT: sarq $63, %rbx
|
|
; CHECK-NEXT: movq %rcx, %r14
|
|
; CHECK-NEXT: sarq $63, %r14
|
|
; CHECK-NEXT: imulq %rdi, %r14
|
|
; CHECK-NEXT: movq %rdi, %rax
|
|
; CHECK-NEXT: mulq %rcx
|
|
; CHECK-NEXT: movq %rdx, %r10
|
|
; CHECK-NEXT: movq %rax, %rdi
|
|
; CHECK-NEXT: addq %r11, %rdi
|
|
; CHECK-NEXT: adcq %r14, %r10
|
|
; CHECK-NEXT: movq %r10, %r11
|
|
; CHECK-NEXT: sarq $63, %r11
|
|
; CHECK-NEXT: addq %r9, %r10
|
|
; CHECK-NEXT: adcq %rbx, %r11
|
|
; CHECK-NEXT: movq %r8, %rax
|
|
; CHECK-NEXT: imulq %rcx
|
|
; CHECK-NEXT: addq %r10, %rax
|
|
; CHECK-NEXT: adcq %r11, %rdx
|
|
; CHECK-NEXT: movq %rdi, %rcx
|
|
; CHECK-NEXT: sarq $63, %rcx
|
|
; CHECK-NEXT: xorq %rcx, %rdx
|
|
; CHECK-NEXT: xorq %rax, %rcx
|
|
; CHECK-NEXT: orq %rdx, %rcx
|
|
; CHECK-NEXT: jne LBB0_1
|
|
; CHECK-NEXT: ## %bb.2: ## %nooverflow
|
|
; CHECK-NEXT: movq %rsi, %rax
|
|
; CHECK-NEXT: movq %rdi, %rdx
|
|
; CHECK-NEXT: popq %rbx
|
|
; CHECK-NEXT: popq %r14
|
|
; CHECK-NEXT: retq
|
|
; CHECK-NEXT: LBB0_1: ## %overflow
|
|
; CHECK-NEXT: ud2
|
|
entry:
|
|
%tmp16 = zext i64 %a.coerce0 to i128
|
|
%tmp11 = zext i64 %a.coerce1 to i128
|
|
%tmp12 = shl nuw i128 %tmp11, 64
|
|
%ins14 = or i128 %tmp12, %tmp16
|
|
%tmp6 = zext i64 %b.coerce0 to i128
|
|
%tmp3 = zext i64 %b.coerce1 to i128
|
|
%tmp4 = shl nuw i128 %tmp3, 64
|
|
%ins = or i128 %tmp4, %tmp6
|
|
%0 = tail call %1 @llvm.smul.with.overflow.i128(i128 %ins14, i128 %ins)
|
|
%1 = extractvalue %1 %0, 0
|
|
%2 = extractvalue %1 %0, 1
|
|
br i1 %2, label %overflow, label %nooverflow
|
|
|
|
overflow: ; preds = %entry
|
|
tail call void @llvm.trap()
|
|
unreachable
|
|
|
|
nooverflow: ; preds = %entry
|
|
%tmp20 = trunc i128 %1 to i64
|
|
%tmp21 = insertvalue %0 undef, i64 %tmp20, 0
|
|
%tmp22 = lshr i128 %1, 64
|
|
%tmp23 = trunc i128 %tmp22 to i64
|
|
%tmp24 = insertvalue %0 %tmp21, i64 %tmp23, 1
|
|
ret %0 %tmp24
|
|
}
|
|
|
|
declare %1 @llvm.smul.with.overflow.i128(i128, i128) nounwind readnone
|
|
|
|
declare void @llvm.trap() nounwind
|