Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LateLowerGCFrame infinite loops in presence of @llvm.vector.insert in IR #55844

Open
Zentrik opened this issue Sep 23, 2024 · 1 comment · May be fixed by #55864
Open

LateLowerGCFrame infinite loops in presence of @llvm.vector.insert in IR #55844

Zentrik opened this issue Sep 23, 2024 · 1 comment · May be fixed by #55864

Comments

@Zentrik
Copy link
Member

Zentrik commented Sep 23, 2024

On master this IR hangs in LateLowerGCFrame

; ModuleID = 'reduced.bc'
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128-ni:10:11:12:13"
target triple = "x86_64-unknown-linux-gnu"

declare ptr @julia.get_pgcstack()

define swiftcc void @julia_abstract_modifyopNOT._36663(<4 x ptr addrspace(10)> %0, <2 x ptr addrspace(10)> %1) {
top:
  %pgcstack = call ptr @julia.get_pgcstack()
  %2 = call <4 x ptr addrspace(10)> @llvm.vector.insert.v4p10.v2p10(<4 x ptr addrspace(10)> %0, <2 x ptr addrspace(10)> %1, i64 2)
  ret void
}

The hang is in the FindBaseValue function as this code doesn't seem to handle this intrinsic

else if (auto II = dyn_cast<IntrinsicInst>(CurrentV)) {
// Some intrinsics behave like LoadInst followed by a SelectInst
// This should never happen in a derived addrspace (since those cannot be stored to memory)
// so we don't need to lift these operations, but we do need to check if it's loaded and continue walking the base pointer
if (II->getIntrinsicID() == Intrinsic::masked_load ||
II->getIntrinsicID() == Intrinsic::masked_gather) {

Zentrik added a commit to Zentrik/llvm_julia_tester that referenced this issue Sep 23, 2024
@Zentrik
Copy link
Member Author

Zentrik commented Jan 22, 2025

Will be fixed by #55864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant