Files
TheRock/compiler/amd-llvm/llvm/test/Analysis/ScalarEvolution/2012-05-29-MulAddRec.ll
T
derek.holloway 7502bf64a4
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
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

51 lines
1.9 KiB
LLVM

; RUN: opt < %s -S -passes='loop(indvars),loop-unroll' | FileCheck %s
;
; loop-unroll fully unrolls the inner loop, creating an interesting
; chain of multiplication. indvars forces SCEV to run again on the
; outer loop. While reducing the recurrence at %mul3, unsigned integer overflow
; causes one of the terms to reach zero. This forces all multiples in
; the recurrence to be zero, reducing the whole thing to a constant expression.
;
; PR12929: cast<Ty>() argument of incompatible type
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-S128"
declare void @use(i8 %x)
; CHECK: @func
; CHECK: for.cond:
; CHECK: %inc1 = phi i8 [ 0, %entry ], [ %0, %for.body ]
; CHECK: br label %for.body
; CHECK: for.body:
; CHECK: %inc.9 = add i8 %inc1, 10
; CHECK: %0 = add i8 %inc1, 10
; CHECK: br label %for.cond
define void @func() noreturn nounwind uwtable ssp {
entry:
br label %for.cond
for.cond.loopexit: ; preds = %for.body
%mul.lcssa = phi i8 [ %mul, %for.body ]
%0 = add i8 %inc1, 10
%indvars.iv.next = add i8 %indvars.iv, 10
br label %for.cond
for.cond: ; preds = %for.cond.loopexit, %entry
%indvars.iv = phi i8 [ %indvars.iv.next, %for.cond.loopexit ], [ 10, %entry ]
%mul3 = phi i8 [ undef, %entry ], [ %mul.lcssa, %for.cond.loopexit ]
%inc1 = phi i8 [ 0, %entry ], [ %0, %for.cond.loopexit ]
call void @use(i8 %inc1)
br label %for.body
for.body: ; preds = %for.body, %for.cond
%inc26 = phi i8 [ %inc1, %for.cond ], [ %inc, %for.body ]
%mul45 = phi i8 [ %mul3, %for.cond ], [ %mul, %for.body ]
%inc = add i8 %inc26, 1
%mul = mul i8 %inc26, %mul45
call void @use(i8 %inc)
%exitcond = icmp ne i8 %inc, %indvars.iv
br i1 %exitcond, label %for.body, label %for.cond.loopexit
}