[PATCH] D20156: PR24071 Fix an assert in SelectionDAGBuilder
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Thu May 12 10:29:06 PDT 2016
rnk added a subscriber: rnk.
================
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;
}
----------------
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?
http://reviews.llvm.org/D20156
More information about the llvm-commits
mailing list