http://llvm.org/bugs/show_bug.cgi?id=16870

            Bug ID: 16870
           Summary: FileCheck full support for logical operators
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

FileCheck already support NOT and AND (Next), but it doesn't yet support OR.

A common use case is:

; CHECK: add r0, r1, r2
; CHECK-OR: add r0, r2, r1

So, a block of CHECK-ORs would be executed on the same block, and the cursor
advances by the length of the smaller pattern matched:

; CHECK: add r0, [[reg1]], [[reg2]]
; CHECK-OR: add r0, [[reg1]], [[reg3]]
; CHECK-OR: add r0, [[reg2]], [[reg1]]
; CHECK-OR: add r0, [[reg2]], [[reg3]]
; CHECK-OR: add r0, [[reg3]], [[reg1]]
; CHECK-OR: add r0, [[reg3]], [[reg2]]

If the text is "add r4", the cursor would advance to "4".

The pattern is broken by any other non-OR checks:

; CHECK: mul r0, ...

Maybe, AND could be an alias to NEXT, but I don't think that's critical.

There's no way to intermix AND/OR for now, since there is no concept of
grouping CHECKs, but it's something to consider for the future if we ever get
that far.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to