Skip to content

[SLP] Assertion `detail::isPresent(Val) && "dyn_cast on a non-existent value"' failed. #120433

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

Closed
dianqk opened this issue Dec 18, 2024 · 0 comments · Fixed by #120434
Closed

Comments

@dianqk
Copy link
Member

dianqk commented Dec 18, 2024

This IR crashes on SLP: https://llvm.godbolt.org/z/8oar4o4d1

define void @foo() {
bb:
  br label %bb1

bb1:                                              ; preds = %bb3, %bb
  %i = phi i32 [ %i26, %bb3 ], [ 0, %bb ]
  %i2 = phi i32 [ %i24, %bb3 ], [ 0, %bb ]
  br label %bb3

bb3:                                              ; preds = %bb1
  %i4 = zext i32 %i2 to i64
  %i5 = mul i64 %i4, 0
  %i10 = or i64 0, %i5
  %i11 = trunc i64 %i10 to i32
  %i12 = and i32 %i11, 0
  %i13 = zext i32 %i to i64
  %i14 = mul i64 %i13, 0
  %i19 = or i64 0, %i14
  %i20 = trunc i64 %i19 to i32
  %i21 = and i32 %i20, 0
  %i22 = or i32 %i12, %i21
  %i23 = icmp ult i32 %i22, 0
  %i24 = select i1 %i23, i32 0, i32 0
  %i25 = icmp ult i32 0, 0
  %i26 = select i1 %i25, i32 0, i32 0
  br label %bb1
}
@dianqk dianqk self-assigned this Dec 18, 2024
dianqk added a commit to dianqk/llvm-project that referenced this issue Dec 19, 2024
tru pushed a commit to dianqk/llvm-project that referenced this issue Jan 14, 2025
tru pushed a commit to dianqk/llvm-project that referenced this issue Jan 14, 2025
fhahn pushed a commit to swiftlang/llvm-project that referenced this issue Apr 29, 2025
fhahn added a commit to swiftlang/llvm-project that referenced this issue Apr 29, 2025
[SLP] Check if instructions exist after vectorization (llvm#120434)

Fixes llvm#120433.

(cherry-picked from 5861191)

rdar://148832843
fhahn pushed a commit to fhahn/llvm-project that referenced this issue May 8, 2025
fhahn pushed a commit to fhahn/llvm-project that referenced this issue May 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant