-
Notifications
You must be signed in to change notification settings - Fork 146
fixup! [CIR][LowerToLLVM] Fix crash in PtrStrideOp lowering #947
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
Conversation
This might be related to llvm/llvm-project#104668, which was reverted and relanded with a fix (with some further follow-ups going in). I'll make this a draft for now and come back to this during the next rebase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to move out of draft (and merge)!
I'll see if this is still needed after the rebase I'm working on right now and revive it if needed :) |
I verified this is needed after the new trunk. |
After recent rebases, the LLVMIR stride operand can be generated by an unrealized_conversion_cast whereas the CIR operand is coming directly from a block argument (and thus has no defining op), so we need to separately check the CIR operand for the existence of a defining op. Fixes llvm#912
bf3a042
to
4a64124
Compare
I spent some time trying to understand this more. If you go back to the original introduction of this commit in 9720c61, both the LLVMIR and CIR versions of the stride are coming directly from a block argument, so I think that's related to llvm/llvm-project#101514. I'd misunderstood the follow-ups (such as llvm/llvm-project#107109 and llvm/llvm-project#106760) as removing |
After recent rebases (likely as a result of [1]), the LLVMIR stride
operand can be generated by an unrealized_conversion_cast whereas the
CIR operand is coming directly from a block argument (and thus has no
defining op), so we need to separately check the CIR operand for the
existence of a defining op.
[1] llvm/llvm-project@2d50029