r226548 - Introduce SPIR calling conventions.

Alexander Kornienko alexfh at google.com
Tue Jan 20 03:08:17 PST 2015


On Tue, Jan 20, 2015 at 12:01 PM, Sameer Sahasrabuddhe <
sameer.sahasrabuddhe at amd.com> wrote:

>
> On 1/20/2015 4:29 PM, Alexander Kornienko wrote:
>
>
> On Tue, Jan 20, 2015 at 11:56 AM, Sameer Sahasrabuddhe <
> sameer.sahasrabuddhe at amd.com> wrote:
>
>>
>> On 1/20/2015 4:24 PM, Sameer Sahasrabuddhe wrote:
>>
>>
>> On 1/20/2015 4:16 PM, Alexander Kornienko wrote:
>>
>>  On Tue, Jan 20, 2015 at 11:33 AM, Alexander Kornienko <alexfh at google.com
>> > wrote:
>>
>>>
>>> On Tue, Jan 20, 2015 at 7:44 AM, Sameer Sahasrabuddhe <
>>> sameer.sahasrabuddhe at amd.com> wrote:
>>>
>>>>
>>>> Added: cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl
>>>> URL:
>>>> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl?rev=226548&view=auto
>>>>
>>>> ==============================================================================
>>>> --- cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl (added)
>>>> +++ cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl Tue Jan 20
>>>> 00:44:32 2015
>>>> @@ -0,0 +1,18 @@
>>>> +// RUN: %clang_cc1 %s -triple "spir-unknown-unknown" -emit-llvm -o - |
>>>> FileCheck %s
>>>> +
>>>> +int get_dummy_id(int D);
>>>> +
>>>> +kernel void bar(global int *A);
>>>> +
>>>> +kernel void foo(global int *A)
>>>> +// CHECK: define spir_kernel void @foo(i32 addrspace(1)* %A)
>>>> +{
>>>> +  int id = get_dummy_id(0);
>>>> +  // CHECK: %call = tail call spir_func i32 @get_dummy_id(i32 0)
>>>>
>>>
>>>   This test fails
>>> <http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/1183/>.
>>> Please fix or revert.
>>>
>>
>>  Clarification: this test fails only in some configurations, thus it
>> doesn't look like a trivial typo in the test which I could fix myself.
>>
>>  This is blocking us, so I'm going to revert the revision.
>>
>>
>> Okay, go ahead, then. Looking into it.
>>
>>
>>
> Reverted in r226558.
>
>
>>  I just had a look, and the failure looks trivial. The test looks for
>> "%call" as the name of the call instruction, but that particular config
>> seems to produce an anonymous value. Could you retry with a different
>> pattern in the test? It will be hard to test this on my machine.
>>
>
>  Yes, I can test it in the setup where it fails. Do you suggest to just
> replace "%call" with "%{{.*}}" or something?
>
>
> Yes, that's correct. The intention is to check for "spir_func" calling
> convention, so anything else that is unpredictable can be matched against a
> regexp.
>

It works with a bit more specific pattern: "%{{[a-z0-9]+}}". I can revert
the revert and apply the fix.


>
>
> Sameer.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150120/8e98a03c/attachment.html>


More information about the cfe-commits mailing list