[llvm] [CGData][GMF] Skip No Params (PR #116548)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 09:28:44 PST 2024


================
@@ -0,0 +1,45 @@
+; This test verifies whether two identical functions, f1 and f2, can be merged
+; locally using the global merge function.
+; The functions, f1.Tgm and f2.Tgm, will be folded by the linker through
+; Identical Code Folding (ICF).
+; While identical functions can already be folded by the linker, creating this
+; canonical form can be beneficial in downstream passes. This merging process
+; can be controlled by the -global-merging-skip-no-params option.
+
+; RUN: llc -enable-global-merge-func=true -global-merging-skip-no-params=false < %s | FileCheck %s --check-prefix=MERGE
+; RUN: llc -enable-global-merge-func=true -global-merging-skip-no-params=true < %s | FileCheck %s --check-prefix=NOMERGE
----------------
ellishg wrote:

This might be equivalent

```suggestion
; RUN: llc -enable-global-merge-func=true -global-merging-skip-no-params=true < %s | FileCheck %s --implicit-check-not=".Tgm"
```

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


More information about the llvm-commits mailing list