[PATCH] Add support to FileCheck for out-of-order matching

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Apr 24 10:05:01 PDT 2013


Hi Michael,

Thanks for working on this!

On Apr 22, 2013, at 5:49 PM, Michael Liao <michael.liao at intel.com> wrote:

> Jakob, for the example you raised, it might be necessary for testers to
> rewrite it from
> 
> 	1: CHECK: testfunctionname
>        2: CHECK-DAG: add [[REG1:r[0-9]+]], r1, r2
>        3: CHECK-DAG: add [[REG2:r[0-9]+]], r3, r4
>        4: CHECK: mul [[REG1]], [[REG2]]
> 
> to
> 
> 	1: CHECK: testfunctionname
>        2: CHECK-DAG: add [[REG1]], r1, r2
>        3: CHECK-DAG: add [[REG2]], r3, r4
>        4: CHECK: mul [[REG1:r[0-9]+]], [[REG2:r[0-9]+]]


As we discussed on the thread, this probably becomes too confusing, and it isn't actually necessary.

CHECK-DAGs can simply search to the end of the file, they don't need a following anchor point.

A CHECK following a set of CHECK-DAGs should begin its search after the CHECK-DAG that matches the latest text.

/jakob




More information about the llvm-commits mailing list