llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

LLC crashes with sample type metadata.

Open JCBurnside opened this issue 1 year ago • 1 comments

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

JCBurnside avatar Mar 24 '24 15:03 JCBurnside

@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

llvmbot avatar Mar 24 '24 15:03 llvmbot

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")

ZiCong-Wang avatar Mar 25 '24 08:03 ZiCong-Wang