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
117 lines
3.8 KiB
LLVM
117 lines
3.8 KiB
LLVM
; RUN: opt %loadNPMPolly '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s
|
|
;
|
|
; Allow the user to define function names that are treated as
|
|
; error functions and assumed not to be executed.
|
|
;
|
|
; void timer_start(void);
|
|
; void timer_stop(void);
|
|
; void kernel(int *A, int *B, int timeit, int N) {
|
|
;
|
|
; if (timeit)
|
|
; timer_start();
|
|
;
|
|
; for (int i = 0; i < N; i++)
|
|
; A[i] += B[i];
|
|
;
|
|
; if (timeit) {
|
|
; timer_stop();
|
|
; timer_start();
|
|
; }
|
|
;
|
|
; for (int i = 0; i < N; i++)
|
|
; A[i] += B[i];
|
|
;
|
|
; if (timeit)
|
|
; timer_stop();
|
|
; }
|
|
;
|
|
; CHECK: Region: %for.cond---%if.end.20
|
|
; CHECK: Assumed Context:
|
|
; CHECK-NEXT: [N, timeit] -> { : }
|
|
; CHECK: Invalid Context:
|
|
; CHECK-NEXT: [N, timeit] -> { : timeit < 0 or timeit > 0 }
|
|
; CHECK: Statements {
|
|
; CHECK: Stmt
|
|
; CHECK: Stmt
|
|
; CHECK-NOT: Stmt
|
|
; CHECK: }
|
|
;
|
|
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
define void @kernel(ptr %A, ptr %B, i32 %timeit, i32 %N) {
|
|
entry:
|
|
%tobool = icmp eq i32 %timeit, 0
|
|
br i1 %tobool, label %if.end, label %if.then
|
|
|
|
if.then: ; preds = %entry
|
|
call void @timer_start()
|
|
br label %if.end
|
|
|
|
if.end: ; preds = %entry, %if.then
|
|
%tmp = sext i32 %N to i64
|
|
br label %for.cond
|
|
|
|
for.cond: ; preds = %for.inc, %if.end
|
|
%indvars.iv1 = phi i64 [ %indvars.iv.next2, %for.inc ], [ 0, %if.end ]
|
|
%cmp = icmp slt i64 %indvars.iv1, %tmp
|
|
br i1 %cmp, label %for.body, label %for.end
|
|
|
|
for.body: ; preds = %for.cond
|
|
%arrayidx = getelementptr inbounds i32, ptr %B, i64 %indvars.iv1
|
|
%tmp3 = load i32, ptr %arrayidx, align 4
|
|
%arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv1
|
|
%tmp4 = load i32, ptr %arrayidx2, align 4
|
|
%add = add nsw i32 %tmp4, %tmp3
|
|
store i32 %add, ptr %arrayidx2, align 4
|
|
br label %for.inc
|
|
|
|
for.inc: ; preds = %for.body
|
|
%indvars.iv.next2 = add nuw nsw i64 %indvars.iv1, 1
|
|
br label %for.cond
|
|
|
|
for.end: ; preds = %for.cond
|
|
%tobool3 = icmp eq i32 %timeit, 0
|
|
br i1 %tobool3, label %if.end.5, label %if.then.4
|
|
|
|
if.then.4: ; preds = %for.end
|
|
call void @timer_stop()
|
|
call void @timer_start()
|
|
br label %if.end.5
|
|
|
|
if.end.5: ; preds = %for.end, %if.then.4
|
|
%tmp5 = sext i32 %N to i64
|
|
br label %for.cond.7
|
|
|
|
for.cond.7: ; preds = %for.inc.15, %if.end.5
|
|
%indvars.iv = phi i64 [ %indvars.iv.next, %for.inc.15 ], [ 0, %if.end.5 ]
|
|
%cmp8 = icmp slt i64 %indvars.iv, %tmp5
|
|
br i1 %cmp8, label %for.body.9, label %for.end.17
|
|
|
|
for.body.9: ; preds = %for.cond.7
|
|
%arrayidx11 = getelementptr inbounds i32, ptr %B, i64 %indvars.iv
|
|
%tmp6 = load i32, ptr %arrayidx11, align 4
|
|
%arrayidx13 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
|
|
%tmp7 = load i32, ptr %arrayidx13, align 4
|
|
%add14 = add nsw i32 %tmp7, %tmp6
|
|
store i32 %add14, ptr %arrayidx13, align 4
|
|
br label %for.inc.15
|
|
|
|
for.inc.15: ; preds = %for.body.9
|
|
%indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
|
|
br label %for.cond.7
|
|
|
|
for.end.17: ; preds = %for.cond.7
|
|
%tobool18 = icmp eq i32 %timeit, 0
|
|
br i1 %tobool18, label %if.end.20, label %if.then.19
|
|
|
|
if.then.19: ; preds = %for.end.17
|
|
call void @timer_stop()
|
|
br label %if.end.20
|
|
|
|
if.end.20: ; preds = %for.end.17, %if.then.19
|
|
ret void
|
|
}
|
|
|
|
declare void @timer_start()
|
|
declare void @timer_stop()
|