Files
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

109 lines
2.8 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: opt -passes=expand-memcmp -mtriple=x86_64-unknown-unknown -S < %s | llc -mtriple=x86_64-unknown-unknown | FileCheck %s
@.str1 = private constant [4 x i8] c"\00\00\00\00", align 1
@.str2 = private constant [4 x i8] c"\ff\ff\ff\ff", align 1
declare i32 @memcmp(ptr, ptr, i64)
define i32 @length4_same() nounwind {
; CHECK-LABEL: length4_same:
; CHECK: # %bb.0:
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind
ret i32 %m
}
define i1 @length4_same_lt() nounwind {
; CHECK-LABEL: length4_same_lt:
; CHECK: # %bb.0:
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind
%c = icmp slt i32 %m, 0
ret i1 %c
}
define i1 @length4_same_gt() nounwind {
; CHECK-LABEL: length4_same_gt:
; CHECK: # %bb.0:
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind
%c = icmp sgt i32 %m, 0
ret i1 %c
}
define i1 @length4_same_le() nounwind {
; CHECK-LABEL: length4_same_le:
; CHECK: # %bb.0:
; CHECK-NEXT: movb $1, %al
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind
%c = icmp sle i32 %m, 0
ret i1 %c
}
define i1 @length4_same_ge() nounwind {
; CHECK-LABEL: length4_same_ge:
; CHECK: # %bb.0:
; CHECK-NEXT: movb $1, %al
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str1, i64 4) nounwind
%c = icmp sge i32 %m, 0
ret i1 %c
}
define i32 @length4() nounwind {
; CHECK-LABEL: length4:
; CHECK: # %bb.0:
; CHECK-NEXT: movl $-1, %eax
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind
ret i32 %m
}
define i1 @length4_lt() nounwind {
; CHECK-LABEL: length4_lt:
; CHECK: # %bb.0:
; CHECK-NEXT: movb $1, %al
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind
%c = icmp slt i32 %m, 0
ret i1 %c
}
define i1 @length4_gt() nounwind {
; CHECK-LABEL: length4_gt:
; CHECK: # %bb.0:
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind
%c = icmp sgt i32 %m, 0
ret i1 %c
}
define i1 @length4_le() nounwind {
; CHECK-LABEL: length4_le:
; CHECK: # %bb.0:
; CHECK-NEXT: movb $1, %al
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind
%c = icmp sle i32 %m, 0
ret i1 %c
}
define i1 @length4_ge() nounwind {
; CHECK-LABEL: length4_ge:
; CHECK: # %bb.0:
; CHECK-NEXT: xorl %eax, %eax
; CHECK-NEXT: retq
%m = tail call i32 @memcmp(ptr @.str1, ptr @.str2, i64 4) nounwind
%c = icmp sge i32 %m, 0
ret i1 %c
}