trailofbits / vast

VAST is an experimental compiler pipeline designed for program analysis of C and C++. It provides a tower of IRs as MLIR dialects to choose the best fit representations for a program analysis or further program abstraction.
https://trailofbits.github.io/vast/
Apache License 2.0
368 stars 23 forks source link

[Bug]: Newly crashing LLVM SingleSource benchmarks #627

Closed Jezurko closed 1 week ago

Jezurko commented 2 weeks ago

VAST version

18

LLVM version

18

Operating system

Linux

Description

Tested on SingleSource/UnitTests/Vector/SSE/sse.shift.c:

vast-front: /home/jezko/src/llvm-project/llvm/include/llvm/Support/Casting.h:578: decltype(auto) llvm::cast(From *) [To = vast::hl::FuncOp, From = mlir::Operation]: Assertion `isa<To>(Val) && "cast<Ty>() argument of incompatible type!"' failed.

#14 0x0000562bbd30bea8 decltype(auto) llvm::cast<vast::hl::FuncOp, mlir::Operation>(mlir::Operation*) /home/jezko/src/llvm-project/llvm/include/llvm/Support/Casting.h:579:39
#15 0x0000562bbd4b7a76 vast::cg::function_generator::emit(clang::FunctionDecl const*) /home/jezko/src/vast/lib/vast/CodeGen/CodeGenFunction.cpp:62:23
#16 0x0000562bbd498245 vast::cg::default_decl_visitor::VisitFunctionDecl(clang::FunctionDecl const*) /home/jezko/src/vast/lib/vast/CodeGen/DefaultDeclVisitor.cpp:274:9
#17 0x0000562bbd4759eb clang::declvisitor::Base<llvm::make_const_ptr, vast::cg::default_decl_visitor, mlir::Operation*>::Visit(clang::Decl const*) /mnt/devel/llvm-18/include/clang/AST/DeclNodes.inc:238:1
#18 0x0000562bbd474f6d vast::cg::default_decl_visitor::visit(clang::Decl const*) /home/jezko/src/vast/include/vast/CodeGen/DefaultDeclVisitor.hpp:26:51
#19 0x0000562bbd474efd vast::cg::default_visitor::visit(clang::Decl const*, vast::cg::scope_context&) /home/jezko/src/vast/lib/vast/CodeGen/DefaultVisitor.cpp:15:9

Steps to Reproduce