Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/X86/and-or-setcc.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

176 lines
5.1 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=i686-unknown-unknown | FileCheck %s --check-prefix=X86
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s --check-prefix=X64
define i1 @and_ord(float %a, float %b) {
; X86-LABEL: and_ord:
; X86: # %bb.0:
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: fucompp
; X86-NEXT: fnstsw %ax
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: setnp %al
; X86-NEXT: retl
;
; X64-LABEL: and_ord:
; X64: # %bb.0:
; X64-NEXT: xorps %xmm2, %xmm2
; X64-NEXT: cmpordss %xmm2, %xmm1
; X64-NEXT: cmpordss %xmm2, %xmm0
; X64-NEXT: andps %xmm1, %xmm0
; X64-NEXT: movd %xmm0, %eax
; X64-NEXT: # kill: def $al killed $al killed $eax
; X64-NEXT: retq
%c = fcmp ord float %a, 0.0
%d = fcmp ord float %b, 0.0
%e = and i1 %c, %d
ret i1 %e
}
define i1 @or_uno(float %a, float %b) {
; X86-LABEL: or_uno:
; X86: # %bb.0:
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: fucompp
; X86-NEXT: fnstsw %ax
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: setp %al
; X86-NEXT: retl
;
; X64-LABEL: or_uno:
; X64: # %bb.0:
; X64-NEXT: xorps %xmm2, %xmm2
; X64-NEXT: cmpunordss %xmm2, %xmm1
; X64-NEXT: cmpunordss %xmm2, %xmm0
; X64-NEXT: orps %xmm1, %xmm0
; X64-NEXT: movd %xmm0, %eax
; X64-NEXT: # kill: def $al killed $al killed $eax
; X64-NEXT: retq
%c = fcmp uno float %a, 0.0
%d = fcmp uno float %b, 0.0
%e = or i1 %c, %d
ret i1 %e
}
define <4 x i1> @and_ord_vec(<4 x float> %a, <4 x float> %b) {
; X86-LABEL: and_ord_vec:
; X86: # %bb.0:
; X86-NEXT: pushl %eax
; X86-NEXT: .cfi_def_cfa_offset 8
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: fstps (%esp) # 4-byte Folded Spill
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: fucompp
; X86-NEXT: fnstsw %ax
; X86-NEXT: fucompp
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: fnstsw %ax
; X86-NEXT: fucompp
; X86-NEXT: setnp %dh
; X86-NEXT: shlb $2, %dh
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: fnstsw %ax
; X86-NEXT: flds (%esp) # 4-byte Folded Reload
; X86-NEXT: fxch %st(1)
; X86-NEXT: fucompp
; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
; X86-NEXT: setnp %dl
; X86-NEXT: shlb $3, %dl
; X86-NEXT: orb %dh, %dl
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: setnp %dh
; X86-NEXT: fnstsw %ax
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: setnp %al
; X86-NEXT: addb %al, %al
; X86-NEXT: orb %dh, %al
; X86-NEXT: orb %dl, %al
; X86-NEXT: movb %al, (%ecx)
; X86-NEXT: movl %ecx, %eax
; X86-NEXT: popl %ecx
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl $4
;
; X64-LABEL: and_ord_vec:
; X64: # %bb.0:
; X64-NEXT: cmpordps %xmm1, %xmm0
; X64-NEXT: retq
%c = fcmp ord <4 x float> %a, %a
%d = fcmp ord <4 x float> %b, %b
%e = and <4 x i1> %c, %d
ret <4 x i1> %e
}
define <4 x i1> @or_uno_vec(<4 x float> %a, <4 x float> %b) {
; X86-LABEL: or_uno_vec:
; X86: # %bb.0:
; X86-NEXT: pushl %eax
; X86-NEXT: .cfi_def_cfa_offset 8
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: fstps (%esp) # 4-byte Folded Spill
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: fucompp
; X86-NEXT: fnstsw %ax
; X86-NEXT: fucompp
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: fnstsw %ax
; X86-NEXT: fucompp
; X86-NEXT: setp %dh
; X86-NEXT: shlb $2, %dh
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: fnstsw %ax
; X86-NEXT: flds (%esp) # 4-byte Folded Reload
; X86-NEXT: fxch %st(1)
; X86-NEXT: fucompp
; X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
; X86-NEXT: setp %dl
; X86-NEXT: shlb $3, %dl
; X86-NEXT: orb %dh, %dl
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: setp %dh
; X86-NEXT: fnstsw %ax
; X86-NEXT: # kill: def $ah killed $ah killed $ax
; X86-NEXT: sahf
; X86-NEXT: setp %al
; X86-NEXT: addb %al, %al
; X86-NEXT: orb %dh, %al
; X86-NEXT: orb %dl, %al
; X86-NEXT: movb %al, (%ecx)
; X86-NEXT: movl %ecx, %eax
; X86-NEXT: popl %ecx
; X86-NEXT: .cfi_def_cfa_offset 4
; X86-NEXT: retl $4
;
; X64-LABEL: or_uno_vec:
; X64: # %bb.0:
; X64-NEXT: cmpunordps %xmm1, %xmm0
; X64-NEXT: retq
%c = fcmp uno <4 x float> %a, %a
%d = fcmp uno <4 x float> %b, %b
%e = or <4 x i1> %c, %d
ret <4 x i1> %e
}