[llvm-bugs] [Bug 37752] New: Manually coming up with the right set and order of FileCheck prefixes is incredibly frustrating.

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 8 11:33:20 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=37752

            Bug ID: 37752
           Summary: Manually coming up with the right set and order of
                    FileCheck prefixes is incredibly frustrating.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 20414
  --> https://bugs.llvm.org/attachment.cgi?id=20414&action=edit
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 https://reviews.llvm.org/D47453, 
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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180608/feddda0e/attachment-0001.html>


More information about the llvm-bugs mailing list