[llvm-branch-commits] [llvm] [StructuralHash] Support Differences (PR #112638)
Ellis Hoag via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Oct 25 12:16:28 PDT 2024
================
@@ -22,3 +26,13 @@ define i32 @f2(i32 %a) {
; DETAILED-HASH-NEXT: Function f1 Hash: [[DF1H:([a-f0-9]{16,})]]
; DETAILED-HASH-NOT: [[DF1H]]
; DETAILED-HASH-NEXT: Function f2 Hash: {{([a-f0-9]{16,})}}
+
+; When ignoring the call target, check if `f1` and `f2` produce the same function hash.
+; The index for the call instruction is 1, and the index of the call target operand is 1.
+; The ignored operand hashes for different call targets should be different.
+; CALLTARGETIGNORED-HASH: Module Hash: {{([a-f0-9]{16,})}}
----------------
ellishg wrote:
Since these are stable hashes. What do you think about adding the literal hash into the test? This would allow us to know exactly when the hash was changed, otherwise the test fails.
I see that you do check that f1 and f2 hash to the same value. Maybe that is good enough.
https://github.com/llvm/llvm-project/pull/112638
More information about the llvm-branch-commits
mailing list