Skip to content

[SLP] Cannot getTypeInfo() on a type that is unsized! #107036

Closed
@dianqk

Description

@dianqk

I tried the following IR with SLP:

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"
target triple = "x86_64-unknown-linux-gnu"

define void @foo(ptr %i) {
bb:
  %i1 = getelementptr i8, ptr %i, i64 4
  br label %bb2

bb2:                                              ; preds = %bb2, %bb
  %i3 = phi i32 [ %i6, %bb2 ], [ 0, %bb ]
  %i4 = phi i32 [ %i8, %bb2 ], [ 0, %bb ]
  store i32 %i3, ptr %i
  store i32 %i4, ptr %i1
  %i5 = trunc i32 0 to i1
  %i6 = select i1 %i5, i32 0, i32 0
  %i7 = trunc i32 %i4 to i1
  %i8 = select i1 %i7, i32 0, i32 0
  br label %bb2
}

It failed with an error output:Ty->isSized() && "Cannot getTypeInfo() on a type that is unsized!"' failed. It's getting the size returned by the store i32 %i4, ptr %i1 instruction.​

https://llvm.godbolt.org/z/fMx9qMcfK

cc f6e01b9 @alexey-bataev

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions