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
Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed. when running opt -passes=loop-deletion #54615
Comments
Starts crashing with commit ff2e4c0:
|
The problem here is this code assumes an Instruction or Argument, while it can also be a GlobalVariable: llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp Lines 2695 to 2699 in c204cee
And the reason why this doesn't happen more commonly is this code: llvm-project/llvm/lib/Analysis/InstructionSimplify.cpp Lines 3544 to 3551 in c204cee
So we need the particular interaction where the original inputs to the icmp are both instructions, but one becomes a GlobalVariable after pointer cast stripping. Normally (e.g. when trying to reproduce via |
Slightly cleaned up test case:
|
…PR54615) This issue reproduces in the context of LoopDeletion, because the bitcast does not get simplified away there. For a plain -inst-simplify run the bitcast would get folded away first. Fixes llvm/llvm-project#54615.
llvm commit: 0365c54
Reproduce with:
opt -passes=loop-deletion -o /dev/null bbi-67899.ll
Result:
bbi-67899.ll.gz
The text was updated successfully, but these errors were encountered: