<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Clang hangs compiling ARM inline assembly, with instruction on unsupported target"
   href="https://bugs.llvm.org/show_bug.cgi?id=32654">32654</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang hangs compiling ARM inline assembly, with instruction on unsupported target
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>kongy.dev@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>$ cat test.cc
float sqrtf(float x) {
  __asm__("vsqrt.f32 %0, %1"
          : "=t"(x)
          : "t"(x));
  return x;
}

$ ~/llvm/build/bin/clang --target=armv5-linux-gnueabi test.c -S -o -
        .text
        .syntax unified
        .eabi_attribute 67, "2.09"      @ Tag_conformance
        .cpu    arm10tdmi
        .eabi_attribute 6, 3    @ Tag_CPU_arch
        .eabi_attribute 8, 1    @ Tag_ARM_ISA_use
        .eabi_attribute 17, 1   @ Tag_ABI_PCS_GOT_use
        .eabi_attribute 20, 1   @ Tag_ABI_FP_denormal
        .eabi_attribute 21, 1   @ Tag_ABI_FP_exceptions
        .eabi_attribute 23, 3   @ Tag_ABI_FP_number_model
        .eabi_attribute 34, 0   @ Tag_CPU_unaligned_access
        .eabi_attribute 24, 1   @ Tag_ABI_align_needed
        .eabi_attribute 25, 1   @ Tag_ABI_align_preserved
        .eabi_attribute 38, 1   @ Tag_ABI_FP_16bit_format
        .eabi_attribute 18, 4   @ Tag_ABI_PCS_wchar_t
        .eabi_attribute 26, 2   @ Tag_ABI_enum_size
        .eabi_attribute 14, 0   @ Tag_ABI_PCS_R9_use
        .file   "test3.c"
clang-5.0:
/usr/local/google/home/yikong/llvm/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:392:
void getCopyToParts(llvm::SelectionDAG &, const llvm::SDLoc &, llvm::SDValue,
llvm::SDValue *, unsigned int, llvm::MVT, const llvm::Value *, ISD::NodeType):
Assertion `DAG.getTargetLoweringInfo().isTypeLegal(PartVT) && "Copying to an
illegal type!"' failed.
(hangs)

vsqrt instruction does not exist for armv5, this should throw an error instead
of compiler internal assertion failure and hanging.</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>