[llvm] [StructuralHash] Refactor (PR #112621)

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 16:22:38 PDT 2024


================
@@ -63,6 +63,14 @@ lpad:
   resume { ptr, i32 } zeroinitializer
 }
 
+define i8 @call_with_same_range() {
+; CHECK-LABEL: @call_with_same_range
+; CHECK: tail call i8 @call_with_range
+  bitcast i8 0 to i8
+  %out = call i8 @dummy(), !range !0
+  ret i8 %out
+}
+
----------------
kyulee-com wrote:

Yes, the existing function merger pass processes functions based on hash values, which slightly changes the order of merged functions --  https://github.com/llvm/llvm-project/blob/main/llvm/lib/Transforms/IPO/MergeFunctions.cpp#L424-L433.
We could use CHECK-DAG for all lines, but that seems too loose. Instead, I adjusted the order of CHECK to match the updated behavior.

https://github.com/llvm/llvm-project/pull/112621


More information about the llvm-commits mailing list