diff --git a/llvm/test/Analysis/StructuralHash/structural-hash-detailed.ll b/llvm/test/Analysis/StructuralHash/structural-hash-detailed.ll --- a/llvm/test/Analysis/StructuralHash/structural-hash-detailed.ll +++ b/llvm/test/Analysis/StructuralHash/structural-hash-detailed.ll @@ -1,16 +1,19 @@ -; Require 64 bits here as the hash will change depending upon whether we are on a 32-bit -; or 64-bit platform. -; REQUIRE: llvm-64-bits +; Ensure that the value of the structural hash is consistent across runs to +; check that we aren't doing something like hashing a pointer that could +; introduce non-determinism. -; RUN: opt -passes='print' -disable-output %s 2>&1 | FileCheck %s +; RUN: opt -passes='print' -disable-output %s &> %t.1 +; RUN: opt -passes='print' -disable-output %s &> %t.2 +; RUN: diff %t.1 %t.2 + +; Check that we get valid output in the detailed case. + +; cat %t.1 | FileCheck %s define i64 @f1(i64 %a) { ret i64 %a } -; These values here are explicitly defined to ensure that they are deterministic -; on all 64-bit platforms and across runs. - -; CHECK: Module Hash: 81f1328ced269bd -; CHECK: Function f1 Hash: 81f1328ced269bd +; CHECK: Module Hash: {{([a-z0-9]{14,})}} +; CHECK: Function f1 Hash: {{([a-z0-9]{14,})}}