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
45 lines
1.6 KiB
LLVM
45 lines
1.6 KiB
LLVM
; RUN: opt -hexagon-loop-idiom -S < %s | FileCheck %s
|
|
; RUN: opt -p hexagon-loop-idiom -S < %s | FileCheck %s
|
|
|
|
; Make sure that we generate correct runtime checks.
|
|
|
|
; CHECK: b7.old:
|
|
; CHECK: [[LEN:%[0-9]+]] = shl nuw i32 %len, 3
|
|
; CHECK: [[SRC:%[0-9]+]] = ptrtoint ptr %src to i32
|
|
; CHECK: [[DST:%[0-9]+]] = ptrtoint ptr %dst to i32
|
|
; CHECK: [[ULT:%[0-9]+]] = icmp ult i32 [[DST]], [[SRC]]
|
|
; CHECK: [[SUB:%[0-9]+]] = sub i32 [[DST]], [[SRC]]
|
|
; CHECK: [[SLT:%[0-9]+]] = icmp sle i32 [[LEN]], [[SUB]]
|
|
; CHECK: [[CND:%[0-9]+]] = or i1 [[ULT]], [[SLT]]
|
|
; CHECK: br i1 [[CND]], label %b8.rtli, label %b8.rtli.ph
|
|
|
|
target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"
|
|
target triple = "hexagon"
|
|
|
|
define void @fred(ptr %dst, ptr %src, i32 %len) #0 {
|
|
b3:
|
|
%v6 = icmp slt i32 0, %len
|
|
br i1 %v6, label %b7, label %b16
|
|
|
|
b7: ; preds = %b3
|
|
br label %b8
|
|
|
|
b8: ; preds = %b13, %b7
|
|
%v9 = phi i32 [ 0, %b7 ], [ %v14, %b13 ]
|
|
%v10 = getelementptr inbounds i64, ptr %src, i32 %v9
|
|
%v11 = load i64, ptr %v10, align 8
|
|
%v12 = getelementptr inbounds i64, ptr %dst, i32 %v9
|
|
store i64 %v11, ptr %v12, align 8
|
|
br label %b13
|
|
|
|
b13: ; preds = %b8
|
|
%v14 = add nsw i32 %v9, 1
|
|
%v15 = icmp slt i32 %v14, %len
|
|
br i1 %v15, label %b8, label %b16
|
|
|
|
b16: ; preds = %b13, %b3
|
|
ret void
|
|
}
|
|
|
|
attributes #0 = { noinline nounwind "target-cpu"="hexagonv60" }
|