[llvm] r365060 - [Bitcode] Update CHECK-DAG usage in tests

Joel E. Denny via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 3 10:31:43 PDT 2019


Author: jdenny
Date: Wed Jul  3 10:31:43 2019
New Revision: 365060

URL: http://llvm.org/viewvc/llvm-project?rev=365060&view=rev
Log:
[Bitcode] Update CHECK-DAG usage in tests

This patch adjusts tests not to depend on deprecated FileCheck
behavior that permits overlapping matches within a block of
`CHECK-DAG` directives:

1. `thinlto-function-summary-originalnames.ll`: The directive with the
pattern `<COMBINED` is surely intended to match `<COMBINED ` (note the
trailing space), but it instead matches
`<COMBINED_GLOBALVAR_INIT_REFS`, for which there is a separate
directive.  With the deprecated behavior, both directives match the
latter text and neither match the former text.  I've adjusted the
former directive so it matches only the former text.

2. `thinlto-summary-local-5.0.ll`: Two directives have identical
patterns when they were clearly meant to have different patterns.

3. `upgrade-pointer-address-space.ll`: There are three identical
directives but only two occurrences of the matching text.  With the
deprecated behavior, they always match exactly the same text, so the
behavior can't have been useful.  I removed one of the directives and
converted the other two from `CHECK-DAG` to `CHECK`.

Reviewed By: probinson, aprantl

Differential Revision: https://reviews.llvm.org/D64036

Modified:
    llvm/trunk/test/Bitcode/thinlto-function-summary-originalnames.ll
    llvm/trunk/test/Bitcode/thinlto-summary-local-5.0.ll
    llvm/trunk/test/Bitcode/upgrade-pointer-address-space.ll

Modified: llvm/trunk/test/Bitcode/thinlto-function-summary-originalnames.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/thinlto-function-summary-originalnames.ll?rev=365060&r1=365059&r2=365060&view=diff
==============================================================================
--- llvm/trunk/test/Bitcode/thinlto-function-summary-originalnames.ll (original)
+++ llvm/trunk/test/Bitcode/thinlto-function-summary-originalnames.ll Wed Jul  3 10:31:43 2019
@@ -1,7 +1,7 @@
 ; Test to check the callgraph in summary
 ; RUN: opt -module-summary %s -o %t.o
 ; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t.o
-; RUN: llvm-bcanalyzer -dump %t.index.bc | FileCheck -allow-deprecated-dag-overlap %s --check-prefix=COMBINED
+; RUN: llvm-bcanalyzer -dump %t.index.bc | FileCheck %s --check-prefix=COMBINED
 
 ; COMBINED:       <GLOBALVAL_SUMMARY_BLOCK
 ; COMBINED-NEXT:    <VERSION
@@ -9,7 +9,7 @@
 ; COMBINED-NEXT:    <VALUE_GUID {{.*}} op1=4947176790635855146/>
 ; COMBINED-NEXT:    <VALUE_GUID {{.*}} op1=-6591587165810580810/>
 ; COMBINED-NEXT:    <VALUE_GUID {{.*}} op1=-4377693495213223786/>
-; COMBINED-DAG:    <COMBINED
+; COMBINED-DAG:    <COMBINED{{ }}
 ; COMBINED-DAG:    <COMBINED_ORIGINAL_NAME op0=6699318081062747564/>
 ; COMBINED-DAG:    <COMBINED_GLOBALVAR_INIT_REFS
 ; COMBINED-DAG:    <COMBINED_ORIGINAL_NAME op0=-2012135647395072713/>

Modified: llvm/trunk/test/Bitcode/thinlto-summary-local-5.0.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/thinlto-summary-local-5.0.ll?rev=365060&r1=365059&r2=365060&view=diff
==============================================================================
--- llvm/trunk/test/Bitcode/thinlto-summary-local-5.0.ll (original)
+++ llvm/trunk/test/Bitcode/thinlto-summary-local-5.0.ll Wed Jul  3 10:31:43 2019
@@ -2,8 +2,8 @@
 ; Checks that older bitcode summaries without the dso_local op are still
 ; properly parsed and don't set GlobalValues as dso_local.
 
-; RUN: llvm-dis < %s.bc | FileCheck -allow-deprecated-dag-overlap %s
-; RUN: llvm-bcanalyzer -dump %s.bc | FileCheck -allow-deprecated-dag-overlap %s --check-prefix=BCAN
+; RUN: llvm-dis < %s.bc | FileCheck %s
+; RUN: llvm-bcanalyzer -dump %s.bc | FileCheck %s --check-prefix=BCAN
 
 define void @foo() {
 ;CHECK-DAG:define void @foo()
@@ -14,7 +14,7 @@ define void @foo() {
 ;CHECK-DAG: @bar = global i32 0
 
 @baz = alias i32, i32* @bar
-;CHECK-DAG: @bar = global i32 0
+;CHECK-DAG: @baz = alias i32, i32* @bar
 
 ;BCAN: <SOURCE_FILENAME
 ;BCAN-NEXT: <GLOBALVAR {{.*}} op7=0/>

Modified: llvm/trunk/test/Bitcode/upgrade-pointer-address-space.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/upgrade-pointer-address-space.ll?rev=365060&r1=365059&r2=365060&view=diff
==============================================================================
--- llvm/trunk/test/Bitcode/upgrade-pointer-address-space.ll (original)
+++ llvm/trunk/test/Bitcode/upgrade-pointer-address-space.ll Wed Jul  3 10:31:43 2019
@@ -1,5 +1,4 @@
-; RUN: llvm-dis -o - %s.bc | FileCheck -allow-deprecated-dag-overlap %s
+; RUN: llvm-dis -o - %s.bc | FileCheck %s
 
-; CHECK-DAG: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{[0-9]+}}, size: {{[0-9]+}})
-; CHECK-DAG: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{[0-9]+}}, size: {{[0-9]+}})
-; CHECK-DAG: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{[0-9]+}}, size: {{[0-9]+}})
+; CHECK: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{[0-9]+}}, size: {{[0-9]+}})
+; CHECK: !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !{{[0-9]+}}, size: {{[0-9]+}})




More information about the llvm-commits mailing list