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
55 lines
1.9 KiB
LLVM
55 lines
1.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
|
; RUN: opt < %s -passes=inline,simplifycfg -S | FileCheck --check-prefix=CUSTOM %s
|
|
; RUN: opt < %s -O2 -S | FileCheck --check-prefix=O2 %s
|
|
|
|
define internal ptr @bar(ptr %arg, i1 %arg1) {
|
|
bb:
|
|
br i1 %arg1, label %bb4, label %bb2
|
|
|
|
bb2:
|
|
%i = load ptr, ptr %arg, align 8
|
|
%i3 = getelementptr inbounds i8, ptr %i, i64 1
|
|
store ptr %i3, ptr %arg, align 8
|
|
br label %bb4
|
|
|
|
bb4:
|
|
%i5 = phi ptr [ %i, %bb2 ], [ null, %bb ]
|
|
ret ptr %i5
|
|
}
|
|
|
|
define i32 @foo(ptr %arg, i1 %arg1) {
|
|
; CUSTOM-LABEL: define i32 @foo(
|
|
; CUSTOM-SAME: ptr [[ARG:%.*]], i1 [[ARG1:%.*]]) {
|
|
; CUSTOM-NEXT: [[BB:.*:]]
|
|
; CUSTOM-NEXT: [[TMP0:%.*]] = xor i1 [[ARG1]], true
|
|
; CUSTOM-NEXT: call void @llvm.assume(i1 [[TMP0]])
|
|
; CUSTOM-NEXT: [[I_I:%.*]] = load ptr, ptr [[ARG]], align 8
|
|
; CUSTOM-NEXT: [[I3_I:%.*]] = getelementptr inbounds i8, ptr [[I_I]], i64 1
|
|
; CUSTOM-NEXT: store ptr [[I3_I]], ptr [[ARG]], align 8
|
|
; CUSTOM-NEXT: [[I2:%.*]] = icmp ne ptr [[I_I]], null
|
|
; CUSTOM-NEXT: call void @llvm.assume(i1 [[I2]])
|
|
; CUSTOM-NEXT: [[I3:%.*]] = load i32, ptr [[I_I]], align 4
|
|
; CUSTOM-NEXT: ret i32 [[I3]]
|
|
;
|
|
; O2-LABEL: define i32 @foo(
|
|
; O2-SAME: ptr captures(none) [[ARG:%.*]], i1 [[ARG1:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
|
; O2-NEXT: [[BB:.*:]]
|
|
; O2-NEXT: [[I_I:%.*]] = load ptr, ptr [[ARG]], align 8, !nonnull [[META0:![0-9]+]], !noundef [[META0]]
|
|
; O2-NEXT: [[I3_I:%.*]] = getelementptr inbounds nuw i8, ptr [[I_I]], i64 1
|
|
; O2-NEXT: store ptr [[I3_I]], ptr [[ARG]], align 8
|
|
; O2-NEXT: [[I3:%.*]] = load i32, ptr [[I_I]], align 4
|
|
; O2-NEXT: ret i32 [[I3]]
|
|
;
|
|
bb:
|
|
%i = call ptr @bar(ptr %arg, i1 %arg1)
|
|
%i2 = icmp ne ptr %i, null
|
|
call void @llvm.assume(i1 %i2)
|
|
%i3 = load i32, ptr %i, align 4
|
|
ret i32 %i3
|
|
}
|
|
|
|
declare void @llvm.assume(i1)
|
|
;.
|
|
; O2: [[META0]] = !{}
|
|
;.
|