<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 - Manually coming up with the right set and order of FileCheck prefixes is incredibly frustrating."
   href="https://bugs.llvm.org/show_bug.cgi?id=37752">37752</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Manually coming up with the right set and order of FileCheck prefixes is incredibly frustrating.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>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>lebedev.ri@gmail.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=20414" name="attach_20414" title="reproducer: apply, build, run ../llvm/utils/update_llc_test_checks.py --llc-binary bin/llc ../llvm/test/CodeGen/*/extract-*bits.ll see that bextr only shows up in the CHECK32-ZZ and CHECK64-ZZ prefixe">attachment 20414</a> <a href="attachment.cgi?id=20414&action=edit" title="reproducer: apply, build, run ../llvm/utils/update_llc_test_checks.py --llc-binary bin/llc ../llvm/test/CodeGen/*/extract-*bits.ll see that bextr only shows up in the CHECK32-ZZ and CHECK64-ZZ prefixe">[details]</a></span>
reproducer: apply, build, run ../llvm/utils/update_llc_test_checks.py
--llc-binary bin/llc ../llvm/test/CodeGen/*/extract-*bits.ll see that bextr
only shows up in the CHECK32-ZZ and CHECK64-ZZ prefixe

So i've been trying to follow-up <a href="https://reviews.llvm.org/D47453">https://reviews.llvm.org/D47453</a>, 
and add BEXTR handling when there is only BMI1.

The current set of run-lines, created with help of Simon Pilgrim:
; RUN: llc -mtriple=i686-unknown-linux-gnu -mattr=-bmi,-tbm,-bmi2 < %s |
FileCheck %s --check-prefixes=CHECK,X86,NOBMI,X86-NOBMI
; RUN: llc -mtriple=i686-unknown-linux-gnu -mattr=+bmi,-tbm,-bmi2 < %s |
FileCheck %s --check-prefixes=CHECK,X86,BMI1,X86-BMI1
; RUN: llc -mtriple=i686-unknown-linux-gnu -mattr=+bmi,+tbm,-bmi2 < %s |
FileCheck %s --check-prefixes=CHECK,X86,BMI1,X86-BMI1,BMI1TBM,X86-BMI1TBM
; RUN: llc -mtriple=i686-unknown-linux-gnu -mattr=+bmi,+tbm,+bmi2 < %s |
FileCheck %s
--check-prefixes=CHECK,X86,BMI1,X86-BMI1,BMI1BMI2,X86-BMI1BMI2,BMI1TBM,X86-BMI1TBM,BMI1TBMBMI2,X86-BMI1TBMBMI2
; RUN: llc -mtriple=i686-unknown-linux-gnu -mattr=+bmi,-tbm,+bmi2 < %s |
FileCheck %s
--check-prefixes=CHECK,X86,BMI1,X86-BMI1,BMI1BMI2,X86-BMI1BMI2,BMI1NOTBMBMI2,X86-BMI1NOTBMBMI2
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=-bmi,-tbm,-bmi2 < %s |
FileCheck %s --check-prefixes=CHECK,X64,NOBMI,X64-NOBMI
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+bmi,-tbm,-bmi2 < %s |
FileCheck %s --check-prefixes=CHECK,X64,BMI1,X64-BMI1
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+bmi,+tbm,-bmi2 < %s |
FileCheck %s --check-prefixes=CHECK,X64,BMI1,X64-BMI1,BMI1TBM,X64-BMI1TBM
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+bmi,+tbm,+bmi2 < %s |
FileCheck %s
--check-prefixes=CHECK,X64,BMI1,X64-BMI1,BMI1BMI2,X64-BMI1BMI2,BMI1TBM,X64-BMI1TBM,BMI1TBMBMI2,X64-BMI1TBMBMI2
; RUN: llc -mtriple=x86_64-unknown-linux-gnu -mattr=+bmi,-tbm,+bmi2 < %s |
FileCheck %s
--check-prefixes=CHECK,X64,BMI1,X64-BMI1,BMI1BMI2,X64-BMI1BMI2,BMI1NOTBMBMI2,X64-BMI1NOTBMBMI2

The problem is, once i have done the tablegen change, it does not show up in
tests...
And there is zero error feedback from FileCheck, or
utils/update_llc_test_checks.py
This is quite unfortunate. I suspect there are other instances of this
elsewhere in existing tests.


While i have come up with a script that can basically run
; RUN: llc <args0> < %s | FileCheck %s --check-prefixes=CHECK-PREFIX0
; RUN: llc <args1> < %s | FileCheck %s --check-prefixes=CHECK-PREFIX1
; RUN: llc <args2> < %s | FileCheck %s --check-prefixes=CHECK-PREFIX2
And, assuming the *entire* output of CHECK-PREFIX0 and CHECK-PREFIX1 matches,
suggest to use
; RUN: llc <args0> < %s | FileCheck %s --check-prefixes=CHECK-PREFIX0
; RUN: llc <args1> < %s | FileCheck %s --check-prefixes=CHECK-PREFIX0
; RUN: llc <args2> < %s | FileCheck %s --check-prefixes=CHECK-PREFIX2
i don't know how to do further deduplication. (for *some* functions, the
CHECK-PREFIX0 and CHECK-PREFIX2 *may* produce the same output)</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>