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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259434 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Teresa Johnson 2016-02-01 23:26:30 +00:00
parent 9d1fe7a916
commit 9ee303a931

View 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.