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
85 lines
2.5 KiB
LLVM
85 lines
2.5 KiB
LLVM
; RUN: opt -p hexagon-loop-idiom -S -mtriple hexagon-unknown-elf \
|
|
; RUN: -pass-remarks=hexagon-lir -pass-remarks-missed=hexagon-lir \
|
|
; RUN: %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
;; Test that HexagonLoopIdiomRecognition emits optimization remarks.
|
|
|
|
;; -- Success: loop converted to memmove --
|
|
; CHECK: remark: {{.*}} converted loop to memmove
|
|
|
|
define void @test_memmove(ptr nocapture %A, ptr nocapture readonly %B, i32 %n) {
|
|
entry:
|
|
%cmp = icmp sgt i32 %n, 0
|
|
br i1 %cmp, label %for.body.preheader, label %for.end
|
|
|
|
for.body.preheader:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%src.phi = phi ptr [ %B, %for.body.preheader ], [ %src.inc, %for.body ]
|
|
%dst.phi = phi ptr [ %A, %for.body.preheader ], [ %dst.inc, %for.body ]
|
|
%i = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
%val = load i32, ptr %src.phi, align 4
|
|
store i32 %val, ptr %dst.phi, align 4
|
|
%inc = add nuw nsw i32 %i, 1
|
|
%exitcond = icmp ne i32 %inc, %n
|
|
%src.inc = getelementptr i32, ptr %src.phi, i32 1
|
|
%dst.inc = getelementptr i32, ptr %dst.phi, i32 1
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
for.end.loopexit:
|
|
br label %for.end
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
;; -- Missed: store value is not a simple load --
|
|
; CHECK: remark: {{.*}} store value is not a simple load
|
|
|
|
define void @test_no_load(ptr nocapture %A, i32 %n) {
|
|
entry:
|
|
%cmp = icmp sgt i32 %n, 0
|
|
br i1 %cmp, label %for.body.preheader, label %for.end
|
|
|
|
for.body.preheader:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%dst.phi = phi ptr [ %A, %for.body.preheader ], [ %dst.inc, %for.body ]
|
|
%i = phi i32 [ %inc, %for.body ], [ 0, %for.body.preheader ]
|
|
store i32 42, ptr %dst.phi, align 4
|
|
%inc = add nuw nsw i32 %i, 1
|
|
%exitcond = icmp ne i32 %inc, %n
|
|
%dst.inc = getelementptr i32, ptr %dst.phi, i32 1
|
|
br i1 %exitcond, label %for.body, label %for.end.loopexit
|
|
|
|
for.end.loopexit:
|
|
br label %for.end
|
|
|
|
for.end:
|
|
ret void
|
|
}
|
|
|
|
;; -- Missed: non-countable loop --
|
|
; CHECK: remark: {{.*}} backedge-taken count is not loop-invariant
|
|
|
|
define void @test_non_countable(ptr nocapture %A, ptr nocapture readonly %B,
|
|
ptr nocapture readonly %cond) {
|
|
entry:
|
|
br label %for.body
|
|
|
|
for.body:
|
|
%src.phi = phi ptr [ %B, %entry ], [ %src.inc, %for.body ]
|
|
%dst.phi = phi ptr [ %A, %entry ], [ %dst.inc, %for.body ]
|
|
%val = load i32, ptr %src.phi, align 4
|
|
store i32 %val, ptr %dst.phi, align 4
|
|
%src.inc = getelementptr i32, ptr %src.phi, i32 1
|
|
%dst.inc = getelementptr i32, ptr %dst.phi, i32 1
|
|
%flag = load volatile i1, ptr %cond, align 1
|
|
br i1 %flag, label %for.body, label %for.end
|
|
|
|
for.end:
|
|
ret void
|
|
}
|