| Issue |
52912
|
| Summary |
llvm/include/llvm/Support/Casting.h:269: typename llvm::cast_retty<X, Y*>::ret_type llvm::cast(Y*) [with X = llvm::AnyCoroIdInst; Y = llvm::Value; typename llvm::cast_retty<X, Y*>::ret_type = llvm::AnyCoroIdInst*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
regehr
|
https://gcc.godbolt.org/z/aK4ndMWqP
this IR crashes `opt -O2`:
```
%g.Frame = type { void (%g.Frame*)*, void (%g.Frame*)*, i32, i1, i32 }
@g.resumers = private constant [3 x void (%g.Frame*)*] [void (%g.Frame*)* bitcast (void ()* @g.dummy to void (%g.Frame*)*), void (%g.Frame*)* bitcast (void ()* @g.dummy to void (%g.Frame*)*), void (%g.Frame*)* bitcast (void ()* @g.dummy to void (%g.Frame*)*)]
declare void @g.dummy()
define i8* @f() #0 {
entry:
%innerhdl = call i8* @llvm.coro.begin(token none, i8* null)
ret i8* null
}
declare i8* @llvm.coro.begin(token, i8* writeonly)
attributes #0 = { "coroutine.presplit"="1" }
```
found by @hatsunespica
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs