[llvm-commits] [llvm] r164662 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll

Bill Wendling isanbard at gmail.com
Thu Sep 27 16:36:59 PDT 2012


On Sep 27, 2012, at 3:38 PM, Eric Christopher <echristo at gmail.com> wrote:

>> Added:
>>    llvm/trunk/test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll
> 
> No need to do the date thing anymore.
> 
But...but...I like dates. :-(

>> Modified:
>>    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
>> 
> 
> 
>>   if (NumParts == 1) {
>> -    assert(PartVT == ValueVT && "Type conversion failed!");
>> +    if (PartVT != ValueVT) {
>> +      LLVMContext &Ctx = *DAG.getContext();
>> +      Twine ErrMsg("scalar-to-vector conversion failed");
>> +      if (const Instruction *I = dyn_cast_or_null<Instruction>(V)) {
>> +        if (const CallInst *CI = dyn_cast<CallInst>(I))
>> +          if (isa<InlineAsm>(CI->getCalledValue()))
>> +            ErrMsg = ErrMsg + ", possible invalid constraint for vector type";
>> +        Ctx.emitError(I, ErrMsg);
> 
> For this part we probably want to diagnose this in the front end, since we
> have access to the constraint and the type coming in. No objections
> to having some information here either, but it's definitely not an ideal
> location. Maybe even a verifier on IR instead that determines that
> we'd fail rather than having to go through codegen for it. It couldn't catch
> cases that are only visibile via optimization, but those should be a
> relatively small sample size.
> 
Ah! Okay. I misunderstood when we discussed this earlier. :-/ Thanks!

-bw





More information about the llvm-commits mailing list