[LLVMdev] LegalizeFloatType:ExpandFloatRes_FADD

Villmow, Micah Micah.Villmow at amd.com
Wed Apr 8 12:51:04 PDT 2009

In the 2.4 code, it explicitly used 2 Operands to the 
MakeLibCall function, whereas in 2.5 it only uses 1 Operand. 
Other functions like pow, cos, sin, only use 1 Operand as 
I would expect since they are unary functions and div/mul 
uses two operands as expected. 

But after looking more closely at the code, I realized my
Mistake in thinking that MakeLibCall was the same in both
Cases but instead it uses LibCallify instead.

Sorry for the mistake,

-----Original Message-----
From: Duncan Sands [mailto:baldrick at free.fr] 
Sent: Wednesday, April 08, 2009 12:25 PM
To: llvmdev at cs.uiuc.edu
Cc: Villmow, Micah
Subject: Re: [LLVMdev] LegalizeFloatType:ExpandFloatRes_FADD

Hi Micah,

> I'm looking at the Legalize code and in 2.5 the above function is:
> It seems to me that it was switched from a binary function expansion
> a unary function expansion.

I don't understand the question.  The new code is supposed to do exactly
the same thing as the old code.  Can you please be more explicit about
what you think the problem is.

> Is my understanding of this correct? If not what is this section of
> support to do?

This turns an FADD (x, y) node into a call to a library function that
performs a floating point addition of x and y.



More information about the llvm-dev mailing list