<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 - Illegal ARM THUMB udiv instruction generated from llc with -filetype=asm, but not -filetype=obj"
   href="https://bugs.llvm.org/show_bug.cgi?id=35630">35630</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Illegal ARM THUMB udiv instruction generated from llc with -filetype=asm, but not -filetype=obj
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </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>jackcarter@arxan.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19537" name="attach_19537" title="gzipped .ll bitcode file that demonstrates the problem">attachment 19537</a> <a href="attachment.cgi?id=19537&action=edit" title="gzipped .ll bitcode file that demonstrates the problem">[details]</a></span>
gzipped .ll bitcode file that demonstrates the problem

The test attached was produced by llvm-extract. The size actually is deceiving
because the actual code in the bitcode takes up less than 120 lines.
llvm-extract pulls in a lot if not all of the original declarations and types
it seems.
This produces the illegal instruction:
llc -filetype=asm -relocation-model=pic -no-stack-coloring
./hkey_expansion_core.bc -o hkey_expansion_core.s
grep udiv hkey_expansion_core.s

Direct object output does not:
llc -filetype=obj -relocation-model=pic -no-stack-coloring
./hkey_expansion_core.bc -o hkey_expansion_core.o
llvm-objdump -arch-name=arm hkey_expansion_core.o > hkey_expansion_core.dis
If I need to reduce the problem further using bugpoint I would be glad for any
suggestions on how to do that since it seems that I would need a .s file with
the desired output and for now I am not sure what that would be other than not
“udiv”. Possibly setting up registers and calling one of the udiv intrinsics.
Regards,
Jack</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>