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
60 lines
1.9 KiB
LLVM
60 lines
1.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=i686-unknown-unknown -mattr=+sse2,+bmi | FileCheck %s --check-prefixes=CHECK,X86
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+sse2,+bmi | FileCheck %s --check-prefixes=CHECK,X64
|
|
|
|
declare i32 @llvm.x86.bmi.bextr.32(i32, i32)
|
|
|
|
define i32 @bextr_zero_length(i32 %x, i32 %y) nounwind {
|
|
; CHECK-LABEL: bextr_zero_length:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: xorl %eax, %eax
|
|
; CHECK-NEXT: ret{{[l|q]}}
|
|
%1 = and i32 %y, 255
|
|
%2 = tail call i32 @llvm.x86.bmi.bextr.32(i32 %x, i32 %1)
|
|
ret i32 %2
|
|
}
|
|
|
|
define i32 @bextr_big_shift(i32 %x, i32 %y) nounwind {
|
|
; X86-LABEL: bextr_big_shift:
|
|
; X86: # %bb.0:
|
|
; X86-NEXT: movl $255, %eax
|
|
; X86-NEXT: orl {{[0-9]+}}(%esp), %eax
|
|
; X86-NEXT: bextrl %eax, {{[0-9]+}}(%esp), %eax
|
|
; X86-NEXT: retl
|
|
;
|
|
; X64-LABEL: bextr_big_shift:
|
|
; X64: # %bb.0:
|
|
; X64-NEXT: orl $255, %esi
|
|
; X64-NEXT: bextrl %esi, %edi, %eax
|
|
; X64-NEXT: retq
|
|
%1 = or i32 %y, 255
|
|
%2 = tail call i32 @llvm.x86.bmi.bextr.32(i32 %x, i32 %1)
|
|
ret i32 %2
|
|
}
|
|
|
|
define float @bextr_uitofp(i32 %x, i32 %y) nounwind {
|
|
; X86-LABEL: bextr_uitofp:
|
|
; X86: # %bb.0:
|
|
; X86-NEXT: pushl %eax
|
|
; X86-NEXT: movl $3855, %eax # imm = 0xF0F
|
|
; X86-NEXT: bextrl %eax, {{[0-9]+}}(%esp), %eax
|
|
; X86-NEXT: movd %eax, %xmm0
|
|
; X86-NEXT: por {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
|
|
; X86-NEXT: subsd {{\.?LCPI[0-9]+_[0-9]+}}, %xmm0
|
|
; X86-NEXT: cvtsd2ss %xmm0, %xmm0
|
|
; X86-NEXT: movss %xmm0, (%esp)
|
|
; X86-NEXT: flds (%esp)
|
|
; X86-NEXT: popl %eax
|
|
; X86-NEXT: retl
|
|
;
|
|
; X64-LABEL: bextr_uitofp:
|
|
; X64: # %bb.0:
|
|
; X64-NEXT: movl $3855, %eax # imm = 0xF0F
|
|
; X64-NEXT: bextrl %eax, %edi, %eax
|
|
; X64-NEXT: cvtsi2ss %eax, %xmm0
|
|
; X64-NEXT: retq
|
|
%1 = tail call i32 @llvm.x86.bmi.bextr.32(i32 %x, i32 3855)
|
|
%2 = uitofp i32 %1 to float
|
|
ret float %2
|
|
}
|