[llvm] r259434 - Add test for PR26419 (stable function summary ordering)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 15:26:30 PST 2016


Author: tejohnson
Date: Mon Feb  1 17:26:30 2016
New Revision: 259434

URL: http://llvm.org/viewvc/llvm-project?rev=259434&view=rev
Log:
Add test for PR26419 (stable function summary ordering)

Enhance an existing test to also check that the ordering of the function
summary entries is stable.

Modified:
    llvm/trunk/test/Bitcode/thinlto-function-summary.ll

Modified: llvm/trunk/test/Bitcode/thinlto-function-summary.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Bitcode/thinlto-function-summary.ll?rev=259434&r1=259433&r2=259434&view=diff
==============================================================================
--- llvm/trunk/test/Bitcode/thinlto-function-summary.ll (original)
+++ llvm/trunk/test/Bitcode/thinlto-function-summary.ll Mon Feb  1 17:26:30 2016
@@ -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.




More information about the llvm-commits mailing list