<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 --- - test/CodeGen/X86/asm-invalid-register-class-crasher.ll doesn't test what it attempts to test"
   href="http://llvm.org/bugs/show_bug.cgi?id=20672">20672</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>test/CodeGen/X86/asm-invalid-register-class-crasher.ll doesn't test what it attempts to test
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>wschmidt@linux.vnet.ibm.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>I recently debugged a problem on PowerPC exposed by the subject test case.  In
the process, I discovered that the test doesn't do what it's intended to do.

During make check-all, the test generates the following script in
test/CodeGen/X86/Output/asm-invalid-register-class-crasher.ll.script:

set -o pipefail;{ not
/home/wschmidt/llvm/build/llvm-test/Release+Asserts/bin/l\
lc <
/home/wschmidt/llvm/llvm-test/test/CodeGen/X86/asm-invalid-register-class-\
crasher.ll -mtriple=i386-apple-darwin 2>&1
/home/wschmidt/llvm/build/llvm-test/\
test/CodeGen/X86/Output/asm-invalid-register-class-crasher.ll.tmp; }

This ends up actually attempting to read from
asm-invalid-register-class-crasher.ll.tmp, which doesn't exist.  So the test
fails because of the non-existence of the file, which "not" then reports as
success.  The IR in the test case is ignored.

The RUN line in the test is:

; RUN: not llc < %s -mtriple=i386-apple-darwin 2>&1 %t

I tried changing this to 

; RUN: not llc < %s -mtriple=i386-apple-darwin >%t 2>&1

but "not" returns 1 in this case.  Not sure how you want to fix this up but
it's not particulary useful as is (except for helping expose an elusive
self-hosting clang bug for PowerPC when opening a missing file). ;)</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>