[llvm-commits] Turning off SSE codegen for x86-64?

Török Edwin edwintorok at gmail.com
Wed Jan 28 12:09:44 PST 2009


On 2009-01-28 21:34, Evan Cheng wrote:
>
> On Jan 28, 2009, at 10:21 AM, Török Edwin wrote:
>
>> On 2009-01-25 22:21, Torok Edwin wrote:
>>> Author: edwin
>>> Date: Sun Jan 25 14:21:24 2009
>>> New Revision: 62972
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=62972&view=rev
>>> Log:
>>> revert this patch for now, because Codegen does still want to
>>> generate SSE code,
>>> for example in the case of va-args. XFAIL associated tests.
>>>
>>
>> Hi Evan,
>>
>> Can you please look at these bugreports and see if there is a way to
>> solve both?
>> http://llvm.org/bugs/show_bug.cgi?id=3402
>> http://llvm.org/bugs/show_bug.cgi?id=3403
>>
>> My attempt to solve PR3402 (by allowing X86SSELevel to be 0 for x86-64)
>> caused PR3403, so I reverted that patch.
>> Are there other placesin codegen (other than va_arg I found in PR3403)
>> that assume x86sselevel > 0 without actually
>> checking that flag?
>
> Unfortunately there is no trivial fix for this. I think some
> vector_shuffle lowering code (and perhaps more) in X86ISelLowering.cpp
> assumes SSE2 is available in 64-bit mode. This will require someone
> walking through the code to fix all the cases.

Do you think an iterative bugfiling/bugfixing approach would be good?
I can test the code, file bugs where unexpected SSE code is generated,
when they are fixed, compile again, file more bugs, and so on till its done?

So far I found that functions with va-args get SSE registers pushed on
the stack on x86-64/linux.
Could you point me to the place where this happens in llvm codegen? If
its not too complicated I may try to propose a patch when I find some time.


Best regards,
--Edwin



More information about the llvm-commits mailing list