Files
TheRock/compiler/amd-llvm/llvm/test/Transforms/ConstantHoisting/X86/pr43903-not-all-uses-rebased.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

50 lines
1.9 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes=consthoist -consthoist-gep=1 -S | FileCheck %s
; This is a reproducer for PR43903 where we hit an assertion:
; opt: ../lib/Transforms/Scalar/ConstantHoisting.cpp:903: bool llvm::ConstantHoistingPass::emitBaseConstants(llvm::GlobalVariable *): Assertion `UsesNum == (ReBasesNum + NotRebasedNum) && "Not all uses are rebased"' failed.
target triple = "x86_64-unknown-linux-gnu"
@a = external global [2 x i16], align 1
define void @c(i1 %arg) {
; CHECK-LABEL: @c(
; CHECK-NEXT: for.cond:
; CHECK-NEXT: br i1 %arg, label [[FOR_BODY2:%.*]], label [[FOR_END4:%.*]]
; CHECK: for.body2:
; CHECK-NEXT: br i1 %arg, label [[LAND_RHS:%.*]], label [[LAND_END:%.*]]
; CHECK: land.rhs:
; CHECK-NEXT: unreachable
; CHECK: land.end:
; CHECK-NEXT: [[CMP:%.*]] = icmp ule ptr undef, @a
; CHECK-NEXT: unreachable
; CHECK: for.cond3:
; CHECK-NEXT: [[TMP0:%.*]] = load i16, ptr getelementptr inbounds ([2 x i16], ptr @a, i32 0, i32 1), align 1
; CHECK-NEXT: br label [[FOR_COND3:%.*]]
; CHECK: for.end4:
; CHECK-NEXT: [[TMP1:%.*]] = load i16, ptr @a, align 1
; CHECK-NEXT: ret void
;
for.cond:
br i1 %arg, label %for.body2, label %for.end4
for.body2: ; preds = %for.cond
br i1 %arg, label %land.rhs, label %land.end
land.rhs: ; preds = %for.body2
unreachable
land.end: ; preds = %for.body2
%cmp = icmp ule ptr undef, @a
unreachable
for.cond3: ; preds = %for.cond3
%tmp0 = load i16, ptr getelementptr inbounds ([2 x i16], ptr @a, i32 0, i32 1), align 1
br label %for.cond3
for.end4: ; preds = %for.cond
%tmp1 = load i16, ptr @a, align 1
ret void
}