<div dir="ltr">Re-applied the patch in r226561 together with the fix.<div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 20, 2015 at 12:17 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Jan 20, 2015 at 12:11 PM, Sameer Sahasrabuddhe <span dir="ltr"><<a href="mailto:sameer.sahasrabuddhe@amd.com" target="_blank">sameer.sahasrabuddhe@amd.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000"><div><div>
    <br>
    <div>On 1/20/2015 4:38 PM, Alexander
      Kornienko wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">On Tue, Jan 20, 2015 at 12:01 PM,
            Sameer Sahasrabuddhe <span dir="ltr"><<a href="mailto:sameer.sahasrabuddhe@amd.com" target="_blank">sameer.sahasrabuddhe@amd.com</a>></span>
            wrote:<br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
              <div bgcolor="#FFFFFF" text="#000000">
                <div>
                  <div> <br>
                    <div>On 1/20/2015 4:29 PM, Alexander Kornienko
                      wrote:<br>
                    </div>
                    <blockquote type="cite">
                      <div dir="ltr"><br>
                        <div class="gmail_extra">On Tue, Jan 20, 2015 at
                          11:56 AM, Sameer Sahasrabuddhe <span dir="ltr"><<a href="mailto:sameer.sahasrabuddhe@amd.com" target="_blank">sameer.sahasrabuddhe@amd.com</a>></span>
                          wrote:<br>
                          <div class="gmail_quote">
                            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                              <div bgcolor="#FFFFFF" text="#000000">
                                <div>
                                  <div> <br>
                                    <div>On 1/20/2015 4:24 PM, Sameer
                                      Sahasrabuddhe wrote:<br>
                                    </div>
                                    <blockquote type="cite"> <br>
                                      <div>On 1/20/2015 4:16 PM,
                                        Alexander Kornienko wrote:<br>
                                      </div>
                                      <blockquote type="cite">
                                        <div dir="ltr">
                                          <div class="gmail_extra">
                                            <div class="gmail_quote">On
                                              Tue, Jan 20, 2015 at 11:33
                                              AM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span>
                                              wrote:<br>
                                              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                                <div dir="ltr"><br>
                                                  <div class="gmail_extra">On
                                                    Tue, Jan 20, 2015 at
                                                    7:44 AM, Sameer
                                                    Sahasrabuddhe <span dir="ltr"><<a href="mailto:sameer.sahasrabuddhe@amd.com" target="_blank">sameer.sahasrabuddhe@amd.com</a>></span>
                                                    wrote:<br>
                                                    <div class="gmail_quote">
                                                      <div>
                                                        <div>
                                                          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
                                                          Added:
                                                          cfe/trunk/test/CodeGenOpenCL/<a href="http://spir-calling-conv.cl" target="_blank">spir-calling-conv.cl</a><br>
                                                          URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl?rev=226548&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenOpenCL/spir-calling-conv.cl?rev=226548&view=auto</a><br>
==============================================================================<br>
                                                          ---
                                                          cfe/trunk/test/CodeGenOpenCL/<a href="http://spir-calling-conv.cl" target="_blank">spir-calling-conv.cl</a>
                                                          (added)<br>
                                                          +++
                                                          cfe/trunk/test/CodeGenOpenCL/<a href="http://spir-calling-conv.cl" target="_blank">spir-calling-conv.cl</a>
                                                          Tue Jan 20
                                                          00:44:32 2015<br>
                                                          @@ -0,0 +1,18
                                                          @@<br>
                                                          +// RUN:
                                                          %clang_cc1 %s
                                                          -triple
                                                          "spir-unknown-unknown"
                                                          -emit-llvm -o
                                                          - | FileCheck
                                                          %s<br>
                                                          +<br>
                                                          +int
                                                          get_dummy_id(int
                                                          D);<br>
                                                          +<br>
                                                          +kernel void
                                                          bar(global int
                                                          *A);<br>
                                                          +<br>
                                                          +kernel void
                                                          foo(global int
                                                          *A)<br>
                                                          +// CHECK:
                                                          define
                                                          spir_kernel
                                                          void @foo(i32
                                                          addrspace(1)*
                                                          %A)<br>
                                                          +{<br>
                                                          +  int id =
                                                          get_dummy_id(0);<br>
                                                          +  // CHECK:
                                                          %call = tail
                                                          call spir_func
                                                          i32
                                                          @get_dummy_id(i32
                                                          0)<br>
                                                          </blockquote>
                                                          <div><br>
                                                          </div>
                                                        </div>
                                                      </div>
                                                      <div>This <a href="http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/1183/" target="_blank">test fails</a>. Please fix or revert.</div>
                                                    </div>
                                                  </div>
                                                </div>
                                              </blockquote>
                                              <div><br>
                                              </div>
                                              <div>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.</div>
                                              <div><br>
                                              </div>
                                              <div>This is blocking us,
                                                so I'm going to revert
                                                the revision.</div>
                                            </div>
                                          </div>
                                        </div>
                                      </blockquote>
                                      <br>
                                      Okay, go ahead, then. Looking into
                                      it.<br>
                                    </blockquote>
                                    <br>
                                  </div>
                                </div>
                              </div>
                            </blockquote>
                            <div> </div>
                            <div>Reverted in r226558.</div>
                            <div> </div>
                            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                              <div bgcolor="#FFFFFF" text="#000000"> 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.</div>
                            </blockquote>
                            <div><br>
                            </div>
                            <div>Yes, I can test it in the setup where
                              it fails. Do you suggest to just replace
                              "%call" with "%{{.*}}" or something?<br>
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                    <br>
                  </div>
                </div>
                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.</div>
            </blockquote>
            <div><br>
            </div>
            <div>It works with a bit more specific pattern:
              "%{{[a-z0-9]+}}". I can revert the revert and apply the
              fix.<br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br></div></div>
    Please do. I won't be able to verify the fix without access to the
    failing config. Do note that the same fix will be required for the
    other call instruction which calls "@bar" with the "spir_kernel"
    calling convention.<br></div></blockquote><div><br></div></div></div><div>The check for the @bar call looks a bit different:</div><span class=""><div>   // CHECK: tail call spir_kernel void @bar(i32 addrspace(1)* %A)</div><div><br></div></span><div>There's no "%call = " part in it and it doesn't fail in my setup.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">
    <br>
    Thanks!<span><font color="#888888"><br>
    <br>
    Sameer.<br></font></span></div></blockquote></div>
</div></div>
</blockquote></div><div><br></div>
</div></div>