-
Notifications
You must be signed in to change notification settings - Fork 769
[SYCL] Do not crash if no matching store found #15658
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
Signed-off-by: Lu, John <[email protected]>
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.
please add [SYCL]
to the PR title and maybe more info about the pass/case it happens
if (I!=std::end(Users)) { | ||
auto *Store = cast<StoreInst>(*I); | ||
MemoryAccess = Store->getValueOperand(); | ||
} | ||
} | ||
return MemoryAccess->stripPointerCastsAndAliases(); |
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.
could we hit a similar problem here?
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.
I don't think it's possible to have a problem. A store must have a value. SpecConstants.cpp has similar code:
V = Store->getValueOperand()->stripPointerCasts();
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.
ah ok yeah i see, thanks
Signed-off-by: Lu, John <[email protected]>
Signed-off-by: Lu, John <[email protected]>
In SYCLMutatePrintfAddrspacePass, when analyzing a format pointer to printf, do not crash when analyzing backwards through load/stores if no matching store is found.