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
44 lines
1.9 KiB
LLVM
44 lines
1.9 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
|
; RUN: opt -passes=loop-idiom < %s -S | FileCheck %s
|
|
|
|
define void @f(ptr nocapture nonnull align 4 dereferenceable(20) %0, i32 %1) local_unnamed_addr #0 align 32 {
|
|
; CHECK-LABEL: @f(
|
|
; CHECK-NEXT: [[TMP3:%.*]] = trunc i32 [[TMP1:%.*]] to i2
|
|
; CHECK-NEXT: [[TMP4:%.*]] = zext i2 [[TMP3]] to i64
|
|
; CHECK-NEXT: [[TMP5:%.*]] = shl nuw nsw i64 [[TMP4]], 2
|
|
; CHECK-NEXT: [[SCEVGEP:%.*]] = getelementptr nuw i8, ptr [[TMP0:%.*]], i64 [[TMP5]]
|
|
; CHECK-NEXT: [[TMP6:%.*]] = sub i2 -1, [[TMP3]]
|
|
; CHECK-NEXT: [[TMP7:%.*]] = zext i2 [[TMP6]] to i64
|
|
; CHECK-NEXT: [[TMP8:%.*]] = shl nuw nsw i64 [[TMP7]], 2
|
|
; CHECK-NEXT: [[TMP9:%.*]] = add nuw nsw i64 [[TMP8]], 4
|
|
; CHECK-NEXT: call void @llvm.memset.p0.i64(ptr align 4 [[SCEVGEP]], i8 0, i64 [[TMP9]], i1 false)
|
|
; CHECK-NEXT: br label [[TMP10:%.*]]
|
|
; CHECK: 10:
|
|
; CHECK-NEXT: [[TMP11:%.*]] = phi i32 [ [[TMP15:%.*]], [[TMP10]] ], [ [[TMP1]], [[TMP2:%.*]] ]
|
|
; CHECK-NEXT: [[TMP12:%.*]] = and i32 [[TMP11]], 3
|
|
; CHECK-NEXT: [[TMP13:%.*]] = zext i32 [[TMP12]] to i64
|
|
; CHECK-NEXT: [[TMP14:%.*]] = getelementptr inbounds i32, ptr [[TMP0]], i64 [[TMP13]]
|
|
; CHECK-NEXT: [[TMP15]] = add nsw i32 [[TMP11]], 1
|
|
; CHECK-NEXT: [[TMP16:%.*]] = and i32 [[TMP15]], 3
|
|
; CHECK-NEXT: [[TMP17:%.*]] = icmp eq i32 [[TMP16]], 0
|
|
; CHECK-NEXT: br i1 [[TMP17]], label [[TMP18:%.*]], label [[TMP10]]
|
|
; CHECK: 18:
|
|
; CHECK-NEXT: ret void
|
|
;
|
|
br label %3
|
|
|
|
3: ; preds = %3, %1
|
|
%4 = phi i32 [ %8, %3 ], [ %1, %2 ]
|
|
%5 = and i32 %4, 3
|
|
%6 = zext i32 %5 to i64
|
|
%7 = getelementptr inbounds i32, ptr %0, i64 %6
|
|
store i32 0, ptr %7, align 4
|
|
%8 = add nsw i32 %4, 1
|
|
%9 = and i32 %8, 3
|
|
%10 = icmp eq i32 %9, 0
|
|
br i1 %10, label %11, label %3
|
|
|
|
11: ; preds = %4
|
|
ret void
|
|
}
|