On 01/30/2013 03:51 PM, Richard Biener wrote:
> On Wed, Jan 30, 2013 at 4:49 PM, Andrew Haley <a...@redhat.com> wrote:
>> On 01/30/2013 03:46 PM, Richard Biener wrote:
>>> On Wed, Jan 30, 2013 at 3:22 PM, Andrew Haley <a...@redhat.com> wrote:
>>>>
>>>> The problem is that LLVM assumes that values are extended at a call.  GCC
>>>> does that, but libffi doesn't.  So, calls via libffi to LLVM don't work
>>>> correctly.
>>>
>>> It's an optimization to do so to avoid partial register stalls.
>>
>> Well, it's hardly an optimization if it's incorrect, and it seems to be
>> incorrect.  As the old saying goes, I can make your code infinitely fast
>> if you don't care about the results.
> 
> It's incorrect to rely on the extension taking place.  It's not incorrect to
> do the extension.

Sure, I understand that, but I am completely baffled as to how
extending at a call site avoids partial register stalls if a callee
cannot assume that a value is already extended.

Andrew.

Reply via email to