Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/LoopLoadElim/loop-i1-count.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

45 lines
2.0 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt -S -passes=loop-load-elim %s | FileCheck %s
; The backedge taken count of this loop is an i1 type, and the IV is i8.
; The math in LoopAccessAnalysis was rounding the type sizes to bytes and
; believing them equal, causing a size mismatch.
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
@a = external dso_local local_unnamed_addr global [1 x i32], align 4
define dso_local void @test(i8 %inc) local_unnamed_addr {
; CHECK-LABEL: @test(
; CHECK-NEXT: entry:
; CHECK-NEXT: br label [[FOR_COND3:%.*]]
; CHECK: for.cond3:
; CHECK-NEXT: [[H_0:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ [[ADD:%.*]], [[COND_END_FOR_COND_CLEANUP_LOOPEXIT_CRIT_EDGE:%.*]] ]
; CHECK-NEXT: [[IDXPROM11:%.*]] = sext i8 [[H_0]] to i64
; CHECK-NEXT: [[ARRAYIDX27:%.*]] = getelementptr inbounds [1 x i32], ptr @a, i64 0, i64 [[IDXPROM11]]
; CHECK-NEXT: br label [[FOR_BODY:%.*]]
; CHECK: cond.end.for.cond.cleanup.loopexit_crit_edge:
; CHECK-NEXT: [[ADD]] = add i8 [[H_0]], [[INC:%.*]]
; CHECK-NEXT: br label [[FOR_COND3]]
; CHECK: for.body:
; CHECK-NEXT: store i32 0, ptr [[ARRAYIDX27]], align 4
; CHECK-NEXT: br i1 true, label [[COND_END_FOR_COND_CLEANUP_LOOPEXIT_CRIT_EDGE]], label [[FOR_BODY]]
;
entry:
br label %for.cond3
for.cond3: ; preds = %cond.end.for.cond.cleanup.loopexit_crit_edge, %entry
%h.0 = phi i8 [ 0, %entry ], [ %add, %cond.end.for.cond.cleanup.loopexit_crit_edge ]
%idxprom11 = sext i8 %h.0 to i64
%arrayidx27 = getelementptr inbounds [1 x i32], ptr @a, i64 0, i64 %idxprom11
br label %for.body
cond.end.for.cond.cleanup.loopexit_crit_edge: ; preds = %for.body
%add = add i8 %h.0, %inc
br label %for.cond3
for.body: ; preds = %for.body, %for.cond3
store i32 0, ptr %arrayidx27, align 4
br i1 true, label %cond.end.for.cond.cleanup.loopexit_crit_edge, label %for.body
}