xref: /llvm-project/llvm/test/Analysis/StructuralHash/structural-hash-detailed.ll (revision d944cab731f1077d8e800fb7c1a91e6fb6b3bb14)
1; Ensure that the value of the structural hash is consistent across runs to
2; check that we aren't doing something like hashing a pointer that could
3; introduce non-determinism.
4
5; RUN: opt -passes='print<structural-hash><detailed>' -disable-output %s &> %t.1
6; RUN: opt -passes='print<structural-hash><detailed>' -disable-output %s &> %t.2
7; RUN: diff %t.1 %t.2
8
9; Check that we get valid output in the detailed case.
10
11; cat %t.1 | FileCheck %s
12
13define i64 @f1(i64 %a) {
14	ret i64 %a
15}
16
17; CHECK: Module Hash: {{([a-z0-9]{14,})}}
18; CHECK: Function f1 Hash: {{([a-z0-9]{14,})}}
19
20