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
54 lines
2.3 KiB
LLVM
54 lines
2.3 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -passes=constraint-elimination -S %s | FileCheck %s
|
|
|
|
target datalayout = "p:128:64"
|
|
|
|
; Test for 128 bit pointers. At the moment, constraints only support signed i64 offsets.
|
|
define i1 @gep_decomp_large_index_63_bits(ptr %a) {
|
|
; CHECK-LABEL: @gep_decomp_large_index_63_bits(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[GEP_1:%.*]] = getelementptr inbounds i64, ptr [[A:%.*]], i64 9223372036854775804
|
|
; CHECK-NEXT: [[GEP_2:%.*]] = getelementptr inbounds i64, ptr [[A]], i64 9223372036854775805
|
|
; CHECK-NEXT: [[NE:%.*]] = icmp ne ptr [[GEP_1]], [[GEP_2]]
|
|
; CHECK-NEXT: call void @llvm.assume(i1 [[NE]])
|
|
; CHECK-NEXT: [[CMP_ULE:%.*]] = icmp ule ptr [[GEP_1]], [[GEP_2]]
|
|
; CHECK-NEXT: [[CMP_UGE:%.*]] = icmp uge ptr [[GEP_1]], [[GEP_2]]
|
|
; CHECK-NEXT: [[RES:%.*]] = xor i1 [[CMP_ULE]], [[CMP_ULE]]
|
|
; CHECK-NEXT: ret i1 [[RES]]
|
|
;
|
|
entry:
|
|
%gep.1 = getelementptr inbounds i64, ptr %a, i64 9223372036854775804
|
|
%gep.2 = getelementptr inbounds i64, ptr %a, i64 9223372036854775805
|
|
%ne = icmp ne ptr %gep.1, %gep.2
|
|
call void @llvm.assume(i1 %ne)
|
|
%cmp.ule = icmp ule ptr %gep.1, %gep.2
|
|
%cmp.uge = icmp uge ptr %gep.1, %gep.2
|
|
%res = xor i1 %cmp.ule, %cmp.ule
|
|
ret i1 %res
|
|
}
|
|
|
|
define i1 @gep_decomp_large_index_67_bits(ptr %a) {
|
|
; CHECK-LABEL: @gep_decomp_large_index_67_bits(
|
|
; CHECK-NEXT: entry:
|
|
; CHECK-NEXT: [[GEP_1:%.*]] = getelementptr inbounds i64, ptr [[A:%.*]], i128 147573952589676412928
|
|
; CHECK-NEXT: [[GEP_2:%.*]] = getelementptr inbounds i64, ptr [[A]], i128 147573952589676412929
|
|
; CHECK-NEXT: [[NE:%.*]] = icmp ne ptr [[GEP_1]], [[GEP_2]]
|
|
; CHECK-NEXT: call void @llvm.assume(i1 [[NE]])
|
|
; CHECK-NEXT: [[CMP_ULE:%.*]] = icmp ule ptr [[GEP_1]], [[GEP_2]]
|
|
; CHECK-NEXT: [[CMP_UGE:%.*]] = icmp uge ptr [[GEP_1]], [[GEP_2]]
|
|
; CHECK-NEXT: [[RES:%.*]] = xor i1 [[CMP_ULE]], [[CMP_UGE]]
|
|
; CHECK-NEXT: ret i1 [[RES]]
|
|
;
|
|
entry:
|
|
%gep.1 = getelementptr inbounds i64, ptr %a, i128 147573952589676412928
|
|
%gep.2 = getelementptr inbounds i64, ptr %a, i128 147573952589676412929
|
|
%ne = icmp ne ptr %gep.1, %gep.2
|
|
call void @llvm.assume(i1 %ne)
|
|
%cmp.ule = icmp ule ptr %gep.1, %gep.2
|
|
%cmp.uge = icmp uge ptr %gep.1, %gep.2
|
|
%res = xor i1 %cmp.ule, %cmp.uge
|
|
ret i1 %res
|
|
}
|
|
|
|
declare void @llvm.assume(i1)
|