<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:renato.golin@linaro.org" title="Renato Golin <renato.golin@linaro.org>"> <span class="fn">Renato Golin</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Assertion failed: (Verify(getFunctionType(), constraints) && "Function type not legal for constraints!"), function InlineAsm, file /Users/lorca/src/llvm/lib/VMCore/InlineAsm.cpp, line 46."
   href="https://llvm.org/bugs/show_bug.cgi?id=13200">bug 13200</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>renato.golin@linaro.org
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Assertion failed: (Verify(getFunctionType(), constraints) && "Function type not legal for constraints!"), function InlineAsm, file /Users/lorca/src/llvm/lib/VMCore/InlineAsm.cpp, line 46."
   href="https://llvm.org/bugs/show_bug.cgi?id=13200#c5">Comment # 5</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Assertion failed: (Verify(getFunctionType(), constraints) && "Function type not legal for constraints!"), function InlineAsm, file /Users/lorca/src/llvm/lib/VMCore/InlineAsm.cpp, line 46."
   href="https://llvm.org/bugs/show_bug.cgi?id=13200">bug 13200</a>
              from <span class="vcard"><a class="email" href="mailto:renato.golin@linaro.org" title="Renato Golin <renato.golin@linaro.org>"> <span class="fn">Renato Golin</span></a>
</span></b>
        <pre>Clang 3.9.0 doesn't crash, and it does warn about "&w" not making sense.

Later on, the ARM back-end does recognise the "w" operand and makes sure that
the sizes are correct and that the shifted immediate makes sense.

In the attached file1.c, the immediate is #0, and the assembler doesn't like
it:

test1.c:9:13: error: invalid operand for instruction
    __asm__("vqshrn.s32 %P0, %q1, #0" : "=w"(tmp16x4_0) : "w"(tmp32x4_0));
            ^
<inline asm>:1:22: note: instantiated into assembly here
        vqshrn.s32 d18, q8, #0
                            ^

but if I change to, say, #4, I get the nice result:

vqshrn.s32    d18, q8, #4

If I use variables with the same size, the assembler also complains:

test1.c:11:13: error: invalid operand for instruction
    __asm__("vqshrn.s32 %P0, %q1, #0" : "=w"(tmp16x4_0) : "w"(tmp16x4_1));
            ^
<inline asm>:1:21: note: instantiated into assembly here
        vqshrn.s32 d16, d16, #0
                           ^
So, the issue is completely fixed already.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>