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
69 lines
2.6 KiB
LLVM
69 lines
2.6 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-inst-comments
|
|
; RUN: opt -S -passes='print<predicate-info>' %s 2>&1 >/dev/null | FileCheck %s
|
|
|
|
declare void @use(i1)
|
|
|
|
define void @nonnull0(ptr %v) {
|
|
; CHECK-LABEL: @nonnull0(
|
|
; CHECK-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(ptr [[V:%.*]]) ]
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
call void @llvm.assume(i1 true) [ "nonnull"(ptr %v) ]
|
|
ret void
|
|
}
|
|
|
|
define void @nonnull1(ptr %v) {
|
|
; CHECK-LABEL: @nonnull1(
|
|
; CHECK-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(ptr [[V:%.*]]) ]
|
|
; CHECK-NEXT: ; assume predicate info { Attribute: nonnull, RenamedOp: [[V]] }
|
|
; CHECK-NEXT: [[TMP1:%.*]] = bitcast ptr [[V]] to ptr
|
|
; CHECK-NEXT: [[C1:%.*]] = icmp eq ptr [[TMP1]], null
|
|
; CHECK-NEXT: call void @use(i1 [[C1]])
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
call void @llvm.assume(i1 true) [ "nonnull"(ptr %v) ]
|
|
%c1 = icmp eq ptr %v, null
|
|
call void @use(i1 %c1)
|
|
ret void
|
|
}
|
|
|
|
define void @nonnull2(ptr %v, ptr %w) {
|
|
; CHECK-LABEL: @nonnull2(
|
|
; CHECK-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(ptr [[V:%.*]]), "nonnull"(ptr [[W:%.*]]) ]
|
|
; CHECK-NEXT: ; assume predicate info { Attribute: nonnull, RenamedOp: [[W]] }
|
|
; CHECK-NEXT: [[TMP1:%.*]] = bitcast ptr [[W]] to ptr
|
|
; CHECK-NEXT: ; assume predicate info { Attribute: nonnull, RenamedOp: [[V]] }
|
|
; CHECK-NEXT: [[TMP2:%.*]] = bitcast ptr [[V]] to ptr
|
|
; CHECK-NEXT: [[C1:%.*]] = icmp eq ptr [[TMP2]], null
|
|
; CHECK-NEXT: call void @use(i1 [[C1]])
|
|
; CHECK-NEXT: [[C2:%.*]] = icmp eq ptr [[TMP1]], null
|
|
; CHECK-NEXT: call void @use(i1 [[C2]])
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
call void @llvm.assume(i1 true) [ "nonnull"(ptr %v), "nonnull"(ptr %w) ]
|
|
%c1 = icmp eq ptr %v, null
|
|
call void @use(i1 %c1)
|
|
%c2 = icmp eq ptr %w, null
|
|
call void @use(i1 %c2)
|
|
ret void
|
|
}
|
|
|
|
define void @nonnull3(ptr %v) {
|
|
; CHECK-LABEL: @nonnull3(
|
|
; CHECK-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(ptr [[V:%.*]]) ]
|
|
; CHECK-NEXT: ; assume predicate info { Attribute: nonnull, RenamedOp: [[V]] }
|
|
; CHECK-NEXT: [[TMP1:%.*]] = bitcast ptr [[V]] to ptr
|
|
; CHECK-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(ptr [[TMP1]]) ]
|
|
; CHECK-NEXT: ; assume predicate info { Attribute: nonnull, RenamedOp: [[TMP1]] }
|
|
; CHECK-NEXT: [[TMP2:%.*]] = bitcast ptr [[TMP1]] to ptr
|
|
; CHECK-NEXT: [[C1:%.*]] = icmp eq ptr [[TMP2]], null
|
|
; CHECK-NEXT: call void @use(i1 [[C1]])
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
call void @llvm.assume(i1 true) [ "nonnull"(ptr %v) ]
|
|
call void @llvm.assume(i1 true) [ "nonnull"(ptr %v) ]
|
|
%c1 = icmp eq ptr %v, null
|
|
call void @use(i1 %c1)
|
|
ret void
|
|
}
|