This fixes a crash where the user is a COPY, which deliberately does not constrain its source operands, resulting in a vreg without a reg class escaping selection.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/GlobalISel/InstructionSelect.cpp | ||
---|---|---|
186 ↗ | (On Diff #132001) | After ISel, is it at all possible that vregs will have no regclass assigned? The above code assumes that specifically. |
lib/CodeGen/GlobalISel/InstructionSelect.cpp | ||
---|---|---|
186 ↗ | (On Diff #132001) | I'm not sure, it did seem odd. Perhaps the underlying issue is manifesting before this. |
Comment Actions
New fix, I think the issue was that IMPLICIT_DEFs weren't constraining their dest register, while COPY selection didn't constrain the source.
Comment Actions
LGTM.
While I was here, I notice that selectCopy was not using getRegClassForTypeOnBank. Could you double check this is intended?
Comment Actions
Thanks, I'll commit this first and follow up on that. At first glance they're using different slightly different register classes so I'm not sure how correct it is to use that.