<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - Backend fails at __builtin_ia32_rdrand32_step, if driver is missing -mrdrnd"
   href="http://llvm.org/bugs/show_bug.cgi?id=22552">22552</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Backend fails at __builtin_ia32_rdrand32_step, if driver is missing -mrdrnd
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>ismail.pazarbasi@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This seems more like a bug than QoI issue. Given:

int /*__attribute__((target("randr")))*/ f() {
  unsigned int v;
  __builtin_ia32_rdrand32_step(&v);
  return v;
}

Without -mrdrnd, clang exits with code 70.

fatal error: error in backend: Cannot select: 0x63a57d0: i32,glue,ch =
X86ISD::RDRAND 0x636c0d0 [ORD=2] [ID=5]
In function: _Z1fv
clang-3.7: error: clang frontend command failed with exit code 70 (use -v to
see invocation)

With -mrdrnd, works as expected.
% clang -c -o randr.o randr.cpp -mrdrnd && echo $?
0

Perhaps, we can warn/error about about missing features.</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>