[PATCH] D20156: PR24071 Fix an assert in SelectionDAGBuilder
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Fri May 13 09:35:48 PDT 2016
rovka added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:6793-6799
@@ -6792,7 +6792,9 @@
if (OpInfo.AssignedRegs.Regs.empty()) {
LLVMContext &Ctx = *DAG.getContext();
Ctx.emitError(CS.getInstruction(),
"couldn't allocate output register for constraint '" +
Twine(OpInfo.ConstraintCode) + "'");
+ auto VT = TLI.getValueType(DAG.getDataLayout(), CS.getType());
+ setValue(CS.getInstruction(), DAG.getUNDEF(VT));
return;
}
----------------
rnk wrote:
> Can you wrap up most of these calls into a helper like SelectionDAGBuilder::emitInlineAsmError(const Twine &) so that we don't forget to call setValue in the future?
Good idea. I'll post an updated version of this next week, after we get the new llc diagnostic handler (so I can add the tests too). Thanks.
http://reviews.llvm.org/D20156
More information about the llvm-commits
mailing list