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
270 lines
8.9 KiB
LLVM
270 lines
8.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: llc < %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=X64,DAG-X64
|
|
; RUN: llc < %s -mtriple=x86_64-linux-gnu -fast-isel | FileCheck %s --check-prefixes=X64,FASTISEL-X64
|
|
; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X64
|
|
; RUN: llc < %s -mtriple=i686-linux-gnu | FileCheck %s --check-prefixes=X86,DAG-X86
|
|
; RUN: llc < %s -mtriple=i686-linux-gnu -fast-isel | FileCheck %s --check-prefixes=X86,FASTISEL-X86
|
|
; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X86
|
|
|
|
define i8 @smin_i8(i8 %a, i8 %b) nounwind readnone {
|
|
; DAG-X64-LABEL: smin_i8:
|
|
; DAG-X64: # %bb.0:
|
|
; DAG-X64-NEXT: movl %esi, %eax
|
|
; DAG-X64-NEXT: cmpb %al, %dil
|
|
; DAG-X64-NEXT: cmovll %edi, %eax
|
|
; DAG-X64-NEXT: # kill: def $al killed $al killed $eax
|
|
; DAG-X64-NEXT: retq
|
|
;
|
|
; FASTISEL-X64-LABEL: smin_i8:
|
|
; FASTISEL-X64: # %bb.0:
|
|
; FASTISEL-X64-NEXT: movzbl %dil, %ecx
|
|
; FASTISEL-X64-NEXT: movzbl %sil, %eax
|
|
; FASTISEL-X64-NEXT: cmpb %al, %cl
|
|
; FASTISEL-X64-NEXT: cmovll %ecx, %eax
|
|
; FASTISEL-X64-NEXT: # kill: def $al killed $al killed $eax
|
|
; FASTISEL-X64-NEXT: retq
|
|
;
|
|
; GISEL-X64-LABEL: smin_i8:
|
|
; GISEL-X64: # %bb.0:
|
|
; GISEL-X64-NEXT: movl %esi, %eax
|
|
; GISEL-X64-NEXT: xorl %ecx, %ecx
|
|
; GISEL-X64-NEXT: cmpb %al, %dil
|
|
; GISEL-X64-NEXT: setl %cl
|
|
; GISEL-X64-NEXT: andl $1, %ecx
|
|
; GISEL-X64-NEXT: cmovnew %di, %ax
|
|
; GISEL-X64-NEXT: # kill: def $al killed $al killed $eax
|
|
; GISEL-X64-NEXT: retq
|
|
;
|
|
; X86-LABEL: smin_i8:
|
|
; X86: # %bb.0:
|
|
; X86-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
|
|
; X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
|
|
; X86-NEXT: cmpb %cl, %al
|
|
; X86-NEXT: jl .LBB0_2
|
|
; X86-NEXT: # %bb.1:
|
|
; X86-NEXT: movl %ecx, %eax
|
|
; X86-NEXT: .LBB0_2:
|
|
; X86-NEXT: retl
|
|
;
|
|
; GISEL-X86-LABEL: smin_i8:
|
|
; GISEL-X86: # %bb.0:
|
|
; GISEL-X86-NEXT: movzbl {{[0-9]+}}(%esp), %ecx
|
|
; GISEL-X86-NEXT: movzbl {{[0-9]+}}(%esp), %eax
|
|
; GISEL-X86-NEXT: xorl %edx, %edx
|
|
; GISEL-X86-NEXT: cmpb %al, %cl
|
|
; GISEL-X86-NEXT: setl %dl
|
|
; GISEL-X86-NEXT: andl $1, %edx
|
|
; GISEL-X86-NEXT: je .LBB0_2
|
|
; GISEL-X86-NEXT: # %bb.1:
|
|
; GISEL-X86-NEXT: movl %ecx, %eax
|
|
; GISEL-X86-NEXT: .LBB0_2:
|
|
; GISEL-X86-NEXT: # kill: def $al killed $al killed $eax
|
|
; GISEL-X86-NEXT: retl
|
|
%ret = call i8 @llvm.smin.i8(i8 %a, i8 %b)
|
|
ret i8 %ret
|
|
}
|
|
define i16 @smin_i16(i16 %a, i16 %b) nounwind readnone {
|
|
; X64-LABEL: smin_i16:
|
|
; X64: # %bb.0:
|
|
; X64-NEXT: movl %esi, %eax
|
|
; X64-NEXT: cmpw %ax, %di
|
|
; X64-NEXT: cmovll %edi, %eax
|
|
; X64-NEXT: # kill: def $ax killed $ax killed $eax
|
|
; X64-NEXT: retq
|
|
;
|
|
; GISEL-X64-LABEL: smin_i16:
|
|
; GISEL-X64: # %bb.0:
|
|
; GISEL-X64-NEXT: movl %edi, %eax
|
|
; GISEL-X64-NEXT: xorl %ecx, %ecx
|
|
; GISEL-X64-NEXT: cmpw %si, %ax
|
|
; GISEL-X64-NEXT: setl %cl
|
|
; GISEL-X64-NEXT: andl $1, %ecx
|
|
; GISEL-X64-NEXT: cmovew %si, %ax
|
|
; GISEL-X64-NEXT: # kill: def $ax killed $ax killed $eax
|
|
; GISEL-X64-NEXT: retq
|
|
;
|
|
; DAG-X86-LABEL: smin_i16:
|
|
; DAG-X86: # %bb.0:
|
|
; DAG-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
|
; DAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
|
; DAG-X86-NEXT: cmpw %cx, %ax
|
|
; DAG-X86-NEXT: jl .LBB1_2
|
|
; DAG-X86-NEXT: # %bb.1:
|
|
; DAG-X86-NEXT: movl %ecx, %eax
|
|
; DAG-X86-NEXT: .LBB1_2:
|
|
; DAG-X86-NEXT: # kill: def $ax killed $ax killed $eax
|
|
; DAG-X86-NEXT: retl
|
|
;
|
|
; FASTISEL-X86-LABEL: smin_i16:
|
|
; FASTISEL-X86: # %bb.0:
|
|
; FASTISEL-X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
|
|
; FASTISEL-X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
|
|
; FASTISEL-X86-NEXT: cmpw %cx, %ax
|
|
; FASTISEL-X86-NEXT: jl .LBB1_2
|
|
; FASTISEL-X86-NEXT: # %bb.1:
|
|
; FASTISEL-X86-NEXT: movl %ecx, %eax
|
|
; FASTISEL-X86-NEXT: .LBB1_2:
|
|
; FASTISEL-X86-NEXT: # kill: def $ax killed $ax killed $eax
|
|
; FASTISEL-X86-NEXT: retl
|
|
;
|
|
; GISEL-X86-LABEL: smin_i16:
|
|
; GISEL-X86: # %bb.0:
|
|
; GISEL-X86-NEXT: movzwl {{[0-9]+}}(%esp), %ecx
|
|
; GISEL-X86-NEXT: movzwl {{[0-9]+}}(%esp), %eax
|
|
; GISEL-X86-NEXT: xorl %edx, %edx
|
|
; GISEL-X86-NEXT: cmpw %ax, %cx
|
|
; GISEL-X86-NEXT: setl %dl
|
|
; GISEL-X86-NEXT: andl $1, %edx
|
|
; GISEL-X86-NEXT: je .LBB1_2
|
|
; GISEL-X86-NEXT: # %bb.1:
|
|
; GISEL-X86-NEXT: movl %ecx, %eax
|
|
; GISEL-X86-NEXT: .LBB1_2:
|
|
; GISEL-X86-NEXT: # kill: def $ax killed $ax killed $eax
|
|
; GISEL-X86-NEXT: retl
|
|
%ret = call i16 @llvm.smin.i16(i16 %a, i16 %b)
|
|
ret i16 %ret
|
|
}
|
|
define i32 @smin_i32(i32 %a, i32 %b) nounwind readnone {
|
|
; X64-LABEL: smin_i32:
|
|
; X64: # %bb.0:
|
|
; X64-NEXT: movl %esi, %eax
|
|
; X64-NEXT: cmpl %esi, %edi
|
|
; X64-NEXT: cmovll %edi, %eax
|
|
; X64-NEXT: retq
|
|
;
|
|
; GISEL-X64-LABEL: smin_i32:
|
|
; GISEL-X64: # %bb.0:
|
|
; GISEL-X64-NEXT: movl %edi, %eax
|
|
; GISEL-X64-NEXT: xorl %ecx, %ecx
|
|
; GISEL-X64-NEXT: cmpl %esi, %edi
|
|
; GISEL-X64-NEXT: setl %cl
|
|
; GISEL-X64-NEXT: andl $1, %ecx
|
|
; GISEL-X64-NEXT: cmovel %esi, %eax
|
|
; GISEL-X64-NEXT: retq
|
|
;
|
|
; X86-LABEL: smin_i32:
|
|
; X86: # %bb.0:
|
|
; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
|
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
|
; X86-NEXT: cmpl %ecx, %eax
|
|
; X86-NEXT: jl .LBB2_2
|
|
; X86-NEXT: # %bb.1:
|
|
; X86-NEXT: movl %ecx, %eax
|
|
; X86-NEXT: .LBB2_2:
|
|
; X86-NEXT: retl
|
|
;
|
|
; GISEL-X86-LABEL: smin_i32:
|
|
; GISEL-X86: # %bb.0:
|
|
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
|
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
|
; GISEL-X86-NEXT: xorl %edx, %edx
|
|
; GISEL-X86-NEXT: cmpl %eax, %ecx
|
|
; GISEL-X86-NEXT: setl %dl
|
|
; GISEL-X86-NEXT: andl $1, %edx
|
|
; GISEL-X86-NEXT: je .LBB2_2
|
|
; GISEL-X86-NEXT: # %bb.1:
|
|
; GISEL-X86-NEXT: movl %ecx, %eax
|
|
; GISEL-X86-NEXT: .LBB2_2:
|
|
; GISEL-X86-NEXT: retl
|
|
%ret = call i32 @llvm.smin.i32(i32 %a, i32 %b)
|
|
ret i32 %ret
|
|
}
|
|
define i64 @smin_i64(i64 %a, i64 %b) nounwind readnone {
|
|
; X64-LABEL: smin_i64:
|
|
; X64: # %bb.0:
|
|
; X64-NEXT: movq %rsi, %rax
|
|
; X64-NEXT: cmpq %rsi, %rdi
|
|
; X64-NEXT: cmovlq %rdi, %rax
|
|
; X64-NEXT: retq
|
|
;
|
|
; GISEL-X64-LABEL: smin_i64:
|
|
; GISEL-X64: # %bb.0:
|
|
; GISEL-X64-NEXT: movq %rdi, %rax
|
|
; GISEL-X64-NEXT: xorl %ecx, %ecx
|
|
; GISEL-X64-NEXT: cmpq %rsi, %rdi
|
|
; GISEL-X64-NEXT: setl %cl
|
|
; GISEL-X64-NEXT: andl $1, %ecx
|
|
; GISEL-X64-NEXT: cmoveq %rsi, %rax
|
|
; GISEL-X64-NEXT: retq
|
|
;
|
|
; DAG-X86-LABEL: smin_i64:
|
|
; DAG-X86: # %bb.0:
|
|
; DAG-X86-NEXT: pushl %edi
|
|
; DAG-X86-NEXT: pushl %esi
|
|
; DAG-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
|
; DAG-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
|
|
; DAG-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
|
; DAG-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
|
|
; DAG-X86-NEXT: cmpl %ecx, %eax
|
|
; DAG-X86-NEXT: movl %edx, %edi
|
|
; DAG-X86-NEXT: sbbl %esi, %edi
|
|
; DAG-X86-NEXT: jl .LBB3_2
|
|
; DAG-X86-NEXT: # %bb.1:
|
|
; DAG-X86-NEXT: movl %ecx, %eax
|
|
; DAG-X86-NEXT: movl %esi, %edx
|
|
; DAG-X86-NEXT: .LBB3_2:
|
|
; DAG-X86-NEXT: popl %esi
|
|
; DAG-X86-NEXT: popl %edi
|
|
; DAG-X86-NEXT: retl
|
|
;
|
|
; FASTISEL-X86-LABEL: smin_i64:
|
|
; FASTISEL-X86: # %bb.0:
|
|
; FASTISEL-X86-NEXT: pushl %edi
|
|
; FASTISEL-X86-NEXT: pushl %esi
|
|
; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
|
|
; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
|
|
; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
|
|
; FASTISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
|
; FASTISEL-X86-NEXT: cmpl %esi, %eax
|
|
; FASTISEL-X86-NEXT: movl %edx, %edi
|
|
; FASTISEL-X86-NEXT: sbbl %ecx, %edi
|
|
; FASTISEL-X86-NEXT: jl .LBB3_2
|
|
; FASTISEL-X86-NEXT: # %bb.1:
|
|
; FASTISEL-X86-NEXT: movl %esi, %eax
|
|
; FASTISEL-X86-NEXT: movl %ecx, %edx
|
|
; FASTISEL-X86-NEXT: .LBB3_2:
|
|
; FASTISEL-X86-NEXT: popl %esi
|
|
; FASTISEL-X86-NEXT: popl %edi
|
|
; FASTISEL-X86-NEXT: retl
|
|
;
|
|
; GISEL-X86-LABEL: smin_i64:
|
|
; GISEL-X86: # %bb.0:
|
|
; GISEL-X86-NEXT: pushl %ebp
|
|
; GISEL-X86-NEXT: pushl %ebx
|
|
; GISEL-X86-NEXT: pushl %edi
|
|
; GISEL-X86-NEXT: pushl %esi
|
|
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %esi
|
|
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ebp
|
|
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
|
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
|
|
; GISEL-X86-NEXT: cmpl %eax, %esi
|
|
; GISEL-X86-NEXT: setb %bl
|
|
; GISEL-X86-NEXT: xorl %ecx, %ecx
|
|
; GISEL-X86-NEXT: cmpl %edx, %ebp
|
|
; GISEL-X86-NEXT: setl %bh
|
|
; GISEL-X86-NEXT: sete %cl
|
|
; GISEL-X86-NEXT: testl %ecx, %ecx
|
|
; GISEL-X86-NEXT: je .LBB3_2
|
|
; GISEL-X86-NEXT: # %bb.1:
|
|
; GISEL-X86-NEXT: movb %bl, %bh
|
|
; GISEL-X86-NEXT: .LBB3_2:
|
|
; GISEL-X86-NEXT: movzbl %bh, %edi
|
|
; GISEL-X86-NEXT: andl $1, %edi
|
|
; GISEL-X86-NEXT: je .LBB3_4
|
|
; GISEL-X86-NEXT: # %bb.3:
|
|
; GISEL-X86-NEXT: movl %esi, %eax
|
|
; GISEL-X86-NEXT: .LBB3_4:
|
|
; GISEL-X86-NEXT: testl %edi, %edi
|
|
; GISEL-X86-NEXT: je .LBB3_6
|
|
; GISEL-X86-NEXT: # %bb.5:
|
|
; GISEL-X86-NEXT: movl %ebp, %edx
|
|
; GISEL-X86-NEXT: .LBB3_6:
|
|
; GISEL-X86-NEXT: popl %esi
|
|
; GISEL-X86-NEXT: popl %edi
|
|
; GISEL-X86-NEXT: popl %ebx
|
|
; GISEL-X86-NEXT: popl %ebp
|
|
; GISEL-X86-NEXT: retl
|
|
%ret = call i64 @llvm.smin.i64(i64 %a, i64 %b)
|
|
ret i64 %ret
|
|
}
|