[llvm-commits] [llvm] r59025 - in /llvm/trunk:	include/llvm/CodeGen/SelectionDAGNodes.h	lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp	lib/CodeGen/SelectionDAG/LegalizeTypes.h
    Mon Ping Wang 
    wangmp at apple.com
       
    Sun Nov 16 16:43:17 PST 2008
    
    
  
Hi Duncan,
Thanks for pointing this out.  I fixed the result promotion and added  
the operand promotion version.
-- Mon Ping
On Nov 12, 2008, at 12:26 AM, Duncan Sands wrote:
> Hi,
>
>> I'm probably misunderstanding the design.  PromoteIntRes will just
>> promote the result.   PromoteIntOp promotes an operand.  An operation
>> that can have an integer result will need a PromteIntRes routine and
>> any operation that can take an integer input will need a
>> PromoteIntOp.  The only cases where PromoteIntRes routine will look  
>> at
>> is operand is to know how to promote the result correctly. (e.g.,   
>> bit
>> convert  needs to know what the input operand is to know what to
>> generate).
>
> exactly.  So why does PromoteIntRes_CONVERT_RNDSAT look at the  
> operand?
> And why did you remove the operand promotion version?
>
>> I didn't do the sign extensions or zero extensions because how these
>> convert operate.  If the convert is i8 to a float, it will do the
>> operation on the lower 8 bits and ignore the rest so having junk up
>> there is fine.  The issue is that I shouldn't look at the promoted
>> value.
>
> OK.
>
> Ciao,
>
> Duncan.
    
    
More information about the llvm-commits
mailing list