[llvm] [Inliner] Put inline history into IR as !inline_history metadata (PR #189701)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 09:48:15 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 172003 tests passed
* 3085 tests skipped
* 3 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CodeGen/LoongArch/intrinsic-la32.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple loongarch32 -target-feature +f -O2 -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la32.c -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la32.c -check-prefix=LA32
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple loongarch32 -target-feature +f -O2 -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la32.c -o -
# .---command stderr------------
# | warning: 'ilp32f' has not been standardized
# `-----------------------------
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la32.c -check-prefix=LA32
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la32.c:172:15: error: LA32-NEXT: expected string not found in input
# | // LA32-NEXT: [[TMP0:%.*]] = tail call { i32, i32 } asm sideeffect "rdtimeh.w $0, $1\0A\09", "=&r,=&r"() #[[ATTR1:[0-9]+]], !srcloc [[META2:![0-9]+]]
# | ^
# | <stdin>:164:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:165:2: note: possible intended match here
# | %0 = tail call { i32, i32 } asm sideeffect "rdtimeh.w $0, $1\0A\09", "=&r,=&r"() #1, !inline_history !5, !srcloc !6
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la32.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 159: ; Function Attrs: nounwind
# | 160: declare i32 @llvm.loongarch.cpucfg(i32) #1
# | 161:
# | 162: ; Function Attrs: nounwind
# | 163: define dso_local void @rdtime() local_unnamed_addr #0 {
# | 164: entry:
# | next:172'0 X error: no match found
# | 165: %0 = tail call { i32, i32 } asm sideeffect "rdtimeh.w $0, $1\0A\09", "=&r,=&r"() #1, !inline_history !5, !srcloc !6
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:172'1 ? possible intended match
# | 166: %1 = tail call { i32, i32 } asm sideeffect "rdtimel.w $0, $1\0A\09", "=&r,=&r"() #1, !inline_history !7, !srcloc !8
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 167: ret void
# | next:172'0 ~~~~~~~~~~
# | 168: }
# | next:172'0 ~~
# | 169:
# | next:172'0 ~
# | 170: ; Function Attrs: nounwind
# | next:172'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CodeGen/LoongArch/intrinsic-la64.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple loongarch64 -target-feature +f -O2 -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la64.c -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la64.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple loongarch64 -target-feature +f -O2 -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la64.c -o -
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la64.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la64.c:390:16: error: CHECK-NEXT: expected string not found in input
# | // CHECK-NEXT: [[TMP0:%.*]] = tail call { i64, i64 } asm sideeffect "rdtime.d $0, $1\0A\09", "=&r,=&r"() #[[ATTR1:[0-9]+]], !srcloc [[META2:![0-9]+]]
# | ^
# | <stdin>:370:7: note: scanning from here
# | entry:
# | ^
# | <stdin>:371:2: note: possible intended match here
# | %0 = tail call { i64, i64 } asm sideeffect "rdtime.d $0, $1\0A\09", "=&r,=&r"() #1, !inline_history !5, !srcloc !6
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la64.c:399:110: error: undefined variable: ATTR1
# | // CHECK-NEXT: [[TMP0:%.*]] = tail call { i32, i32 } asm sideeffect "rdtimeh.w $0, $1\0A\09", "=&r,=&r"() #[[ATTR1]], !srcloc [[META3:![0-9]+]]
# | ^
# | <stdin>:378:2: note: possible intended match here
# | %0 = tail call { i32, i32 } asm sideeffect "rdtimeh.w $0, $1\0A\09", "=&r,=&r"() #1, !inline_history !7, !srcloc !8
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/LoongArch/intrinsic-la64.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 365: ; Function Attrs: nounwind
# | 366: declare i32 @llvm.loongarch.cpucfg(i32) #1
# | 367:
# | 368: ; Function Attrs: nounwind
# | 369: define dso_local void @rdtime_d() local_unnamed_addr #0 {
# | 370: entry:
# | next:390'0 X error: no match found
# | 371: %0 = tail call { i64, i64 } asm sideeffect "rdtime.d $0, $1\0A\09", "=&r,=&r"() #1, !inline_history !5, !srcloc !6
# | next:390'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:390'1 ? possible intended match
# | 372: ret void
# | next:390'0 ~~~~~~~~~~
# | 373: }
# | next:390'0 ~~
# | 374:
# | next:390'0 ~
# | 375: ; Function Attrs: nounwind
# | next:390'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 376: define dso_local void @rdtime() local_unnamed_addr #0 {
# | next:390'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 377: entry:
# | next:399'0 X error: match failed for invalid pattern
# | next:399'1 undefined variable: ATTR1
# | 378: %0 = tail call { i32, i32 } asm sideeffect "rdtimeh.w $0, $1\0A\09", "=&r,=&r"() #1, !inline_history !7, !srcloc !8
# | next:399'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:399'2 ? possible intended match
# | 379: %1 = tail call { i32, i32 } asm sideeffect "rdtimel.w $0, $1\0A\09", "=&r,=&r"() #1, !inline_history !9, !srcloc !10
# | next:399'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 380: ret void
# | next:399'0 ~~~~~~~~~~
# | 381: }
# | next:399'0 ~~
# | 382:
# | next:399'0 ~
# | 383: ; Function Attrs: nounwind
# | next:399'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CodeGen/memcpy-inline-builtin.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64 -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/memcpy-inline-builtin.c | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/memcpy-inline-builtin.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/23/include -nostdsysteminc -triple x86_64 -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/memcpy-inline-builtin.c
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/memcpy-inline-builtin.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/memcpy-inline-builtin.c:44:16: error: CHECK-NEXT: expected string not found in input
# | // CHECK-NEXT: call void asm sideeffect "# memcpy.inline marker", "~{dirflag},~{fpsr},~{flags}"() #[[ATTR3:[0-9]+]], !srcloc [[META2:![0-9]+]]
# | ^
# | <stdin>:29:38: note: scanning from here
# | store i64 %2, ptr %c.addr.i, align 8
# | ^
# | <stdin>:30:2: note: possible intended match here
# | call void asm sideeffect "# memcpy.inline marker", "~{dirflag},~{fpsr},~{flags}"() #3, !inline_history !1, !srcloc !2
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/memcpy-inline-builtin.c:72:103: error: undefined variable: ATTR3
# | // CHECK-NEXT: call void asm sideeffect "# memmove.inline marker", "~{dirflag},~{fpsr},~{flags}"() #[[ATTR3]], !srcloc [[META3:![0-9]+]]
# | ^
# | <stdin>:59:2: note: possible intended match here
# | call void asm sideeffect "# memmove.inline marker", "~{dirflag},~{fpsr},~{flags}"() #3, !inline_history !3, !srcloc !4
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/memcpy-inline-builtin.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 24: %0 = load ptr, ptr %a.addr, align 8
# | 25: %1 = load ptr, ptr %b.addr, align 8
# | 26: %2 = load i64, ptr %c.addr, align 8
# | 27: store ptr %0, ptr %a.addr.i, align 8
# | 28: store ptr %1, ptr %b.addr.i, align 8
# | 29: store i64 %2, ptr %c.addr.i, align 8
# | next:44'0 X error: no match found
# | 30: call void asm sideeffect "# memcpy.inline marker", "~{dirflag},~{fpsr},~{flags}"() #3, !inline_history !1, !srcloc !2
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:44'1 ? possible intended match
# | 31: %3 = load ptr, ptr %a.addr.i, align 8
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 32: %4 = load ptr, ptr %b.addr.i, align 8
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 33: %5 = load i64, ptr %c.addr.i, align 8
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 34: call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr align 1 %4, i64 %5, i1 false)
# | next:44'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 35: ret ptr %3
# | next:44'0 ~~~~~~~~~~~~
# | .
# | .
# | .
# | 53: %0 = load ptr, ptr %a.addr, align 8
# | 54: %1 = load ptr, ptr %b.addr, align 8
# | 55: %2 = load i64, ptr %c.addr, align 8
# | 56: store ptr %0, ptr %a.addr.i, align 8
# | 57: store ptr %1, ptr %b.addr.i, align 8
# | 58: store i64 %2, ptr %c.addr.i, align 8
# | next:72'0 X error: match failed for invalid pattern
# | next:72'1 undefined variable: ATTR3
# | 59: call void asm sideeffect "# memmove.inline marker", "~{dirflag},~{fpsr},~{flags}"() #3, !inline_history !3, !srcloc !4
# | next:72'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:72'2 ? possible intended match
# | 60: %3 = load ptr, ptr %a.addr.i, align 8
# | next:72'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 61: %4 = load ptr, ptr %b.addr.i, align 8
# | next:72'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 62: %5 = load i64, ptr %c.addr.i, align 8
# | next:72'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 63: call void @llvm.memmove.p0.p0.i64(ptr align 1 %3, ptr align 1 %4, i64 %5, i1 false)
# | next:72'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 64: ret ptr %3
# | next:72'0 ~~~~~~~~~~~~
# | .
# | .
# | .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/189701
More information about the llvm-commits
mailing list