[LLVMdev] Problems expanding fcmp to a libcall

Richard Osborne rlsosborne at googlemail.com
Fri Jul 4 02:16:32 PDT 2008


Evan Cheng wrote:
> On Jul 3, 2008, at 3:07 PM, Richard Osborne wrote:
>   
>>> This seems to break the convention. It should be the responsibility  
>>> of  the caller to further legalize the results.
>>>
>>> Evan
>>>       
>> That makes sense. In that case I believe  
>> SelectionDAGLegalize::LegalizeSetCCOperands
>> should be legalizing the result. The description of this function  
>> says it tries to create a
>> legal LHS and RHS but it this case it fails to return a legal LHS.  
>> The following patch allows me to
>> compile my original file.
>>
>> --- LegalizeDAG.cpp~	2008-07-03 23:03:35.000000000 +0100
>> +++ LegalizeDAG.cpp	2008-07-03 23:03:38.000000000 +0100
>> @@ -4749,7 +4749,7 @@
>>         Tmp1 = DAG.getNode(ISD::OR, Tmp1.getValueType(), Tmp1, Tmp2);
>>         Tmp2 = SDOperand();
>>       }
>> -      LHS = Tmp1;
>> +      LHS = LegalizeOp(Tmp1);
>>       RHS = Tmp2;
>>       return;
>>     }
>>     
>
> Ok, I think this is the right patch. Do you have commit access?
>
> Thanks,
>
> Evan
>   
I don't have any commit access. Would you be able to submit this for me?

Cheers,

Richard



More information about the llvm-dev mailing list