llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.55k stars 11.8k forks source link

LLC crashes with sample type metadata. #86442

Open JCBurnside opened 6 months ago

JCBurnside commented 6 months ago

Reading through this page on the reference for type metadata. and two errors happen. first it says declare void @g() !type !3 is invalid specifically

error: expected '=' here declare void @g() !type !3

(with the caret under !3 I couldn't figure out how to get the formatting correct) secondly after commenting that line out it crashes saying it doesn't know how to promote an operator. Sample https://llvm.godbolt.org/z/EKK4h74nz

llvmbot commented 6 months ago

@llvm/issue-subscribers-backend-x86

Author: Jasmine Burnside (JCBurnside)

Reading through [this page](https://llvm.org/docs/TypeMetadata.html) on the reference for type metadata. and two errors happen. first it says `declare void @g() !type !3` is invalid specifically > error: expected '=' here `declare void @g() !type !3` (with the caret under `!3` I couldn't figure out how to get the formatting correct) secondly after commenting that line out it crashes saying it doesn't know how to promote an operator. Sample https://llvm.godbolt.org/z/EKK4h74nz
ZiCong-Wang commented 6 months ago

I think the reference may be out of date and declare !type !3 void @g() can work. The LLVM ERROR: Do not know how to promote this operator! error comes from %x = call i1 @llvm.type.test(i8* %pi8, metadata !"typeid1")