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
50 lines
1.6 KiB
LLVM
50 lines
1.6 KiB
LLVM
; RUN: opt < %s -passes=indvars -S | FileCheck %s
|
|
; Test WidenIV::GetExtendedOperandRecurrence.
|
|
; %add, %sub and %mul should be extended to i64 because it is nsw, even though its
|
|
; sext cannot be hoisted outside the loop.
|
|
|
|
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
|
|
|
|
declare void @use(i64 %x)
|
|
|
|
define void @test(i1 %arg) nounwind {
|
|
entry:
|
|
br i1 %arg, label %for.body11, label %for.end285
|
|
|
|
for.body11: ; preds = %entry
|
|
%shl = shl i32 1, 1
|
|
%shl132 = shl i32 %shl, 1
|
|
br label %for.body153
|
|
|
|
for.body153: ; preds = %for.body153, %for.body11
|
|
br i1 %arg, label %for.body170, label %for.body153
|
|
|
|
; CHECK: add nuw nsw i64 %indvars.iv, 1
|
|
; CHECK: sub nsw i64 %indvars.iv, 2
|
|
; CHECK: sub nsw i64 4, %indvars.iv
|
|
; CHECK: mul nsw i64 %indvars.iv, 8
|
|
for.body170: ; preds = %for.body170, %for.body153
|
|
%i2.19 = phi i32 [ %add249, %for.body170 ], [ 0, %for.body153 ]
|
|
|
|
%add = add nsw i32 %i2.19, 1
|
|
%add.idxprom = sext i32 %add to i64
|
|
call void @use(i64 %add.idxprom)
|
|
|
|
%sub = sub nsw i32 %i2.19, 2
|
|
%sub.idxprom = sext i32 %sub to i64
|
|
call void @use(i64 %sub.idxprom)
|
|
|
|
%sub.neg = sub nsw i32 4, %i2.19
|
|
%sub.neg.idxprom = sext i32 %sub.neg to i64
|
|
call void @use(i64 %sub.neg.idxprom)
|
|
|
|
%mul = mul nsw i32 %i2.19, 8
|
|
%mul.idxprom = sext i32 %mul to i64
|
|
call void @use(i64 %mul.idxprom)
|
|
|
|
%add249 = add nsw i32 %i2.19, %shl132
|
|
br label %for.body170
|
|
for.end285: ; preds = %entry
|
|
ret void
|
|
}
|