[PATCH] D118602: [CodeGenPrepare] Avoid out-of-bounds shift
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 3 08:12:43 PST 2022
bjope added a comment.
In D118602#3293795 <https://reviews.llvm.org/D118602#3293795>, @spatel wrote:
> This seems fine, but check my understanding: there's no difference in the test output with this fix if opt is not built with ubsan enabled?
Yes. Unfortunately the test case (as-is) doen't show any difference. I'm not sure exactly how to modify the test case to achive that.
> Could/should we just exit if we detect malformed IR?
Yes, that is another option. I kind of copied how this was dealt with on line 6491 (another place where CGP is analyzing Shl), but bailing out when finding an OOB shift amount seems safe here. Is that preferred?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118602/new/
https://reviews.llvm.org/D118602
More information about the llvm-commits
mailing list