[PATCH] D55694: GlobalISel: Improve crash on invalid mapping
Justin Bogner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 17 15:19:52 PST 2018
bogner accepted this revision.
bogner added a comment.
This revision is now accepted and ready to land.
In D55694#1332646 <https://reviews.llvm.org/D55694#1332646>, @arsenm wrote:
> In D55694#1332254 <https://reviews.llvm.org/D55694#1332254>, @bogner wrote:
>
> > I don’t think I understand what this is trying to accomplish. ISTM that this will now hit a null dereference on line 123 when we read BreadDown in the case that NumBreakDowns is zero, but this is to avoid hitting an assert somewhere else? If this is to make it clearer as to what’s failing, shouldn’t we assert NumBreakDowns != 0 here instead of just hoping to crash on a null dereference?
>
>
> No, that is what this avoids. Right now there is a null dereference on line 123. Now this function exits, so this continues until it hits
> Assertion failed: (getOperandMapping(Idx).isValid() && "We must have a mapping for reg operands"), function verify, file ../lib/CodeGen/GlobalISel/RegisterBankInfo.cpp, line 572.
Sorry, I must've read this diff backwards or something. LGTM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55694/new/
https://reviews.llvm.org/D55694
More information about the llvm-commits
mailing list