summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-02-01 23:26:30 +0000
committerTeresa Johnson <tejohnson@google.com>2016-02-01 23:26:30 +0000
commita9a630759facd50ed2f801695180bf7c498460d4 (patch)
tree1344aaee8004240f18fa7737348e97c5445e5069
parent0f0f82e58c9f05059d3cee4c17963ce191804700 (diff)
downloadbcm5719-llvm-a9a630759facd50ed2f801695180bf7c498460d4.tar.gz
bcm5719-llvm-a9a630759facd50ed2f801695180bf7c498460d4.zip
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. llvm-svn: 259434
-rw-r--r--llvm/test/Bitcode/thinlto-function-summary.ll13
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/test/Bitcode/thinlto-function-summary.ll b/llvm/test/Bitcode/thinlto-function-summary.ll
index 9c2f2acd6c7..d9531f7da89 100644
--- a/llvm/test/Bitcode/thinlto-function-summary.ll
+++ b/llvm/test/Bitcode/thinlto-function-summary.ll
@@ -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.
OpenPOWER on IntegriCloud