OSDN Git Service

Add test for PR26419 (stable function summary ordering)
authorTeresa Johnson <tejohnson@google.com>
Mon, 1 Feb 2016 23:26:30 +0000 (23:26 +0000)
committerTeresa Johnson <tejohnson@google.com>
Mon, 1 Feb 2016 23:26:30 +0000 (23:26 +0000)
Enhance an existing test to also check that the ordering of the function
summary entries is stable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259434 91177308-0d34-0410-b5e6-96231b3b80d8

test/Bitcode/thinlto-function-summary.ll

index 9c2f2ac..d9531f7 100644 (file)
@@ -1,11 +1,18 @@
 ; RUN: llvm-as -function-summary < %s | llvm-bcanalyzer -dump | FileCheck %s -check-prefix=BC
 ; Check for function summary block/records.
 
+; Check the value ids in the function summary entries against the
+; same in the ValueSumbolTable, to ensure the ordering is stable.
+; Also check the islocal flag on the summary entries.
 ; BC: <FUNCTION_SUMMARY_BLOCK
-; BC-NEXT: <PERMODULE_ENTRY
-; BC-NEXT: <PERMODULE_ENTRY
-; BC-NEXT: <PERMODULE_ENTRY
+; BC-NEXT: <PERMODULE_ENTRY {{.*}} op0=1 op1=0
+; BC-NEXT: <PERMODULE_ENTRY {{.*}} op0=2 op1=0
+; BC-NEXT: <PERMODULE_ENTRY {{.*}} op0=4 op1=1
 ; BC-NEXT: </FUNCTION_SUMMARY_BLOCK
+; BC-NEXT: <VALUE_SYMTAB
+; BC-NEXT: <FNENTRY {{.*}} op0=1 {{.*}}> record string = 'foo'
+; BC-NEXT: <FNENTRY {{.*}} op0=2 {{.*}}> record string = 'bar'
+; BC-NEXT: <FNENTRY {{.*}} op0=4 {{.*}}> record string = 'f'
 
 ; RUN: llvm-as -function-summary < %s | llvm-dis | FileCheck %s
 ; Check that this round-trips correctly.