Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt -memcpyopt crashing with Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed. #47419

Closed
mikaelholmen opened this issue Nov 4, 2020 · 2 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@mikaelholmen
Copy link
Collaborator

Bugzilla Link 48075
Resolution FIXED
Resolved on Nov 23, 2020 06:18
Version trunk
OS Linux
Attachments bbi-48944.ll reproducer
CC @rotateright
Fixed by commit(s) c5a4d80

Extended Description

Reproduce with:
opt -S -o - bbi-48944.ll -memcpyopt

Result:
opt: ../include/llvm/Support/Casting.h:269: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = llvm::PointerType, Y = llvm::Type]: Assertion `isa(Val) && "cast() argument of incompatible type!"' failed.

This seems to be rather old, I've reproduced it with saved builds from July 2019.

@rotateright
Copy link
Contributor

I'm not sure if there's some enhancement potential in here, but this should prevent the crashing at least by dyn_casting instead of plain casting:
https://reviews.llvm.org/rGc5a4d80fd47c

@mikaelholmen
Copy link
Collaborator Author

Thanks!

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants