[llvm] [InstrProf] Inline ir-basic.proftext into test (PR #219329)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 16:52:47 PDT 2026


https://github.com/ellishg created https://github.com/llvm/llvm-project/pull/219329

`{fe,ir}-basic.proftext` are only used in `merge-incompatible.test`. Inline them into the test and remove the files from `Inputs/`.

>From 05530b7170a35788e3bbf01657303858f1960bbe Mon Sep 17 00:00:00 2001
From: Ellis Hoag <ellishoag at meta.com>
Date: Thu, 27 Aug 2026 16:51:03 -0700
Subject: [PATCH] [InstrProf] Inline ir-basic.proftext into test

---
 .../llvm-profdata/Inputs/fe-basic.proftext    |  6 -----
 .../llvm-profdata/Inputs/ir-basic.proftext    |  6 -----
 .../llvm-profdata/merge-incompatible.test     | 26 +++++++++++++++----
 3 files changed, 21 insertions(+), 17 deletions(-)
 delete mode 100644 llvm/test/tools/llvm-profdata/Inputs/fe-basic.proftext
 delete mode 100644 llvm/test/tools/llvm-profdata/Inputs/ir-basic.proftext

diff --git a/llvm/test/tools/llvm-profdata/Inputs/fe-basic.proftext b/llvm/test/tools/llvm-profdata/Inputs/fe-basic.proftext
deleted file mode 100644
index 34aa036401769..0000000000000
--- a/llvm/test/tools/llvm-profdata/Inputs/fe-basic.proftext
+++ /dev/null
@@ -1,6 +0,0 @@
-:fe
-foo
-29667547796
-2
-100
-90
diff --git a/llvm/test/tools/llvm-profdata/Inputs/ir-basic.proftext b/llvm/test/tools/llvm-profdata/Inputs/ir-basic.proftext
deleted file mode 100644
index b177a624a7b50..0000000000000
--- a/llvm/test/tools/llvm-profdata/Inputs/ir-basic.proftext
+++ /dev/null
@@ -1,6 +0,0 @@
-:ir
-foo2
-29667547796
-2
-100
-90
diff --git a/llvm/test/tools/llvm-profdata/merge-incompatible.test b/llvm/test/tools/llvm-profdata/merge-incompatible.test
index ea9eb0e95d834..b489b91200db7 100644
--- a/llvm/test/tools/llvm-profdata/merge-incompatible.test
+++ b/llvm/test/tools/llvm-profdata/merge-incompatible.test
@@ -1,21 +1,37 @@
 RUN: export LSAN_OPTIONS=detect_leaks=0
 RUN: rm -rf %t && split-file %s %t
 
-RUN: not llvm-profdata merge %p/Inputs/fe-basic.proftext %p/Inputs/ir-basic.proftext -o /dev/null 2>&1 | FileCheck %s
+RUN: not llvm-profdata merge %t/fe-basic.proftext %t/ir-basic.proftext -o /dev/null 2>&1 | FileCheck %s
 CHECK: ir-basic.proftext: unsupported instrumentation profile format version: cannot merge IR generated profile with Clang generated profile
 
 // We get a slightly different error message when using multiple threads because
 // we do not know which files have incompatible kinds.
-RUN: not llvm-profdata merge %p/Inputs/fe-basic.proftext %p/Inputs/ir-basic.proftext --num-threads=2 -o /dev/null 2>&1 | FileCheck %s --check-prefix=THREADS
+RUN: not llvm-profdata merge %t/fe-basic.proftext %t/ir-basic.proftext --num-threads=2 -o /dev/null 2>&1 | FileCheck %s --check-prefix=THREADS
 THREADS: unsupported instrumentation profile format version
 
 // Single-byte-coverage profiles cannot be merged with count profiles, in either
 // order, because the merged profile would be marked as coverage-only.
-RUN: not llvm-profdata merge %p/Inputs/ir-basic.proftext %t/coverage.proftext -o /dev/null 2>&1 | FileCheck %s --check-prefix=COVERAGE
-RUN: not llvm-profdata merge %t/coverage.proftext %p/Inputs/ir-basic.proftext -o /dev/null 2>&1 | FileCheck %s --check-prefix=COVERAGE
-RUN: not llvm-profdata merge %p/Inputs/ir-basic.proftext %t/coverage.proftext --num-threads=2 -o /dev/null 2>&1 | FileCheck %s --check-prefix=COVERAGE
+RUN: not llvm-profdata merge %t/ir-basic.proftext %t/coverage.proftext -o /dev/null 2>&1 | FileCheck %s --check-prefix=COVERAGE
+RUN: not llvm-profdata merge %t/coverage.proftext %t/ir-basic.proftext -o /dev/null 2>&1 | FileCheck %s --check-prefix=COVERAGE
+RUN: not llvm-profdata merge %t/ir-basic.proftext %t/coverage.proftext --num-threads=2 -o /dev/null 2>&1 | FileCheck %s --check-prefix=COVERAGE
 COVERAGE: cannot merge single-byte and incrementing counter profiles
 
+//--- fe-basic.proftext
+:fe
+foo
+29667547796
+2
+100
+90
+
+//--- ir-basic.proftext
+:ir
+foo2
+29667547796
+2
+100
+90
+
 //--- coverage.proftext
 :ir
 :single_byte_coverage



More information about the llvm-commits mailing list