[clang] [CIR] Cast alloca for function parameter to the right address space (PR #220836)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 7 04:28:12 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 93461 tests passed
* 819 tests skipped
* 4 tests failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.CIR/CodeGen/ptrdiff.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.cir
# 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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.cir
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CIR --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CIR --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# note: command had no output on stdout or stderr
# 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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp-cir.ll
# 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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp-cir.ll
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=LLVM --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp-cir.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=LLVM --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp-cir.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# note: command had no output on stdout or stderr
# RUN: at line 5
/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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll
# 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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=OGCG --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=OGCG --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c:25:11: error: OGCG: expected string not found in input
# | // OGCG: %[[PTR_A:.*]] = ptrtoint ptr {{.*}} to i64
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:7:31: note: scanning from here
# | define dso_local i32 @addrcmp(ptr noundef %a, ptr noundef %b) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:7:31: note: pattern attempts to capture variables: "PTR_A"
# | define dso_local i32 @addrcmp(ptr noundef %a, ptr noundef %b) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:17:15: note: possible intended match here
# | %sub.ptr.lhs.cast = ptrtoaddr ptr %1 to i64
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c:53:11: error: OGCG: expected string not found in input
# | // OGCG: %[[IA:.*]] = ptrtoint ptr %{{.*}} to i64
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:25:37: note: scanning from here
# | define dso_local i64 @test_ptr_diff(ptr noundef %a, ptr noundef %b) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:25:37: note: pattern attempts to capture variables: "IA"
# | define dso_local i64 @test_ptr_diff(ptr noundef %a, ptr noundef %b) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:33:14: note: possible intended match here
# | %sub.ptr.lhs.cast = ptrtoaddr ptr %0 to i64
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c'
# | 2: source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: ; Function Attrs: noinline nounwind optnone
# | 7: define dso_local i32 @addrcmp(ptr noundef %a, ptr noundef %b) #0 {
# | check:25'0 { search range start (exclusive)
# | check:25'1 error: no match found in search range
# | check:25'2 pattern attempts to capture variables: "PTR_A"
# | 8: entry:
# | 9: %a.addr = alloca ptr, align 8
# | 10: %b.addr = alloca ptr, align 8
# | 11: store ptr %a, ptr %a.addr, align 8
# | 12: store ptr %b, ptr %b.addr, align 8
# | 13: %0 = load ptr, ptr %a.addr, align 8
# | 14: %1 = load ptr, ptr %0, align 8
# | 15: %2 = load ptr, ptr %b.addr, align 8
# | 16: %3 = load ptr, ptr %2, align 8
# | 17: %sub.ptr.lhs.cast = ptrtoaddr ptr %1 to i64
# | check:25'3 ? possible intended match
# | 18: %sub.ptr.rhs.cast = ptrtoaddr ptr %3 to i64
# | 19: %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
# | 20: %conv = trunc i64 %sub.ptr.sub to i32
# | 21: ret i32 %conv
# | 22: }
# | 23:
# | 24: ; Function Attrs: noinline nounwind optnone
# | 25: define dso_local i64 @test_ptr_diff(ptr noundef %a, ptr noundef %b) #0 {
# | check:25'4 } search range end (exclusive)
# | check:53'0 { search range start (exclusive)
# | check:53'1 error: no match found in search range
# | check:53'2 pattern attempts to capture variables: "IA"
# | 26: entry:
# | 27: %a.addr = alloca ptr, align 8
# | 28: %b.addr = alloca ptr, align 8
# | 29: store ptr %a, ptr %a.addr, align 8
# | 30: store ptr %b, ptr %b.addr, align 8
# | 31: %0 = load ptr, ptr %a.addr, align 8
# | 32: %1 = load ptr, ptr %b.addr, align 8
# | 33: %sub.ptr.lhs.cast = ptrtoaddr ptr %0 to i64
# | check:53'3 ? possible intended match
# | 34: %sub.ptr.rhs.cast = ptrtoaddr ptr %1 to i64
# | 35: %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
# | 36: %sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 4
# | 37: ret i64 %sub.ptr.div
# | 38: }
# | 39:
# | 40: attributes #0 = { noinline nounwind optnone "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
# | 41:
# | 42: !llvm.ident = !{!0}
# | 43:
# | 44: !0 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project ca564a398ea2d5e2403efc69529d78f5fcae20c2)"}
# | check:53'4 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CIR/CodeGen/ptrdiff.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.cir
# 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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.cir
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=CIR
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=CIR
# note: command had no output on stdout or stderr
# 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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp-cir.ll
# 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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp-cir.ll
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp-cir.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=LLVM
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp-cir.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=LLVM
# note: command had no output on stdout or stderr
# RUN: at line 5
/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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll
# 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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=OGCG
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=OGCG
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp:30:11: error: OGCG: expected string not found in input
# | // OGCG: %[[IA:.*]] = ptrtoint ptr %{{.*}} to i64
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll:7:43: note: scanning from here
# | define dso_local noundef i64 @_Z4sizePmS_(ptr noundef %_start, ptr noundef %_finish) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll:7:43: note: pattern attempts to capture variables: "IA"
# | define dso_local noundef i64 @_Z4sizePmS_(ptr noundef %_start, ptr noundef %_finish) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll:15:14: note: possible intended match here
# | %sub.ptr.lhs.cast = ptrtoaddr ptr %0 to i64
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp'
# | 2: source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: ; Function Attrs: mustprogress noinline nounwind optnone
# | 7: define dso_local noundef i64 @_Z4sizePmS_(ptr noundef %_start, ptr noundef %_finish) #0 {
# | check:30'0 { search range start (exclusive)
# | check:30'1 error: no match found in search range
# | check:30'2 pattern attempts to capture variables: "IA"
# | 8: entry:
# | 9: %_start.addr = alloca ptr, align 8
# | 10: %_finish.addr = alloca ptr, align 8
# | 11: store ptr %_start, ptr %_start.addr, align 8
# | 12: store ptr %_finish, ptr %_finish.addr, align 8
# | 13: %0 = load ptr, ptr %_finish.addr, align 8
# | 14: %1 = load ptr, ptr %_start.addr, align 8
# | 15: %sub.ptr.lhs.cast = ptrtoaddr ptr %0 to i64
# | check:30'3 ? possible intended match
# | 16: %sub.ptr.rhs.cast = ptrtoaddr ptr %1 to i64
# | 17: %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
# | 18: %sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
# | 19: ret i64 %sub.ptr.div
# | 20: }
# | 21:
# | 22: attributes #0 = { mustprogress noinline nounwind optnone "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
# | 23:
# | 24: !llvm.ident = !{!0}
# | 25:
# | 26: !0 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project ca564a398ea2d5e2403efc69529d78f5fcae20c2)"}
# | check:30'4 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CIR/CodeGen/ptrdiff.c</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.cir
# 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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.cir
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CIR --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=CIR --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# note: command had no output on stdout or stderr
# 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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp-cir.ll
# 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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp-cir.ll
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=LLVM --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp-cir.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=LLVM --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp-cir.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# note: command had no output on stdout or stderr
# RUN: at line 5
/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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll
# 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/24/include -nostdsysteminc -triple x86_64-unknown-linux-gnu -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=OGCG --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=OGCG --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c:25:11: error: OGCG: expected string not found in input
# | // OGCG: %[[PTR_A:.*]] = ptrtoint ptr {{.*}} to i64
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:7:31: note: scanning from here
# | define dso_local i32 @addrcmp(ptr noundef %a, ptr noundef %b) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:7:31: note: pattern attempts to capture variables: "PTR_A"
# | define dso_local i32 @addrcmp(ptr noundef %a, ptr noundef %b) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:17:15: note: possible intended match here
# | %sub.ptr.lhs.cast = ptrtoaddr ptr %1 to i64
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c:53:11: error: OGCG: expected string not found in input
# | // OGCG: %[[IA:.*]] = ptrtoint ptr %{{.*}} to i64
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:25:37: note: scanning from here
# | define dso_local i64 @test_ptr_diff(ptr noundef %a, ptr noundef %b) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:25:37: note: pattern attempts to capture variables: "IA"
# | define dso_local i64 @test_ptr_diff(ptr noundef %a, ptr noundef %b) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll:33:14: note: possible intended match here
# | %sub.ptr.lhs.cast = ptrtoaddr ptr %0 to i64
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.c.tmp.ll
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c'
# | 2: source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.c"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: ; Function Attrs: noinline nounwind optnone
# | 7: define dso_local i32 @addrcmp(ptr noundef %a, ptr noundef %b) #0 {
# | check:25'0 { search range start (exclusive)
# | check:25'1 error: no match found in search range
# | check:25'2 pattern attempts to capture variables: "PTR_A"
# | 8: entry:
# | 9: %a.addr = alloca ptr, align 8
# | 10: %b.addr = alloca ptr, align 8
# | 11: store ptr %a, ptr %a.addr, align 8
# | 12: store ptr %b, ptr %b.addr, align 8
# | 13: %0 = load ptr, ptr %a.addr, align 8
# | 14: %1 = load ptr, ptr %0, align 8
# | 15: %2 = load ptr, ptr %b.addr, align 8
# | 16: %3 = load ptr, ptr %2, align 8
# | 17: %sub.ptr.lhs.cast = ptrtoaddr ptr %1 to i64
# | check:25'3 ? possible intended match
# | 18: %sub.ptr.rhs.cast = ptrtoaddr ptr %3 to i64
# | 19: %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
# | 20: %conv = trunc i64 %sub.ptr.sub to i32
# | 21: ret i32 %conv
# | 22: }
# | 23:
# | 24: ; Function Attrs: noinline nounwind optnone
# | 25: define dso_local i64 @test_ptr_diff(ptr noundef %a, ptr noundef %b) #0 {
# | check:25'4 } search range end (exclusive)
# | check:53'0 { search range start (exclusive)
# | check:53'1 error: no match found in search range
# | check:53'2 pattern attempts to capture variables: "IA"
# | 26: entry:
# | 27: %a.addr = alloca ptr, align 8
# | 28: %b.addr = alloca ptr, align 8
# | 29: store ptr %a, ptr %a.addr, align 8
# | 30: store ptr %b, ptr %b.addr, align 8
# | 31: %0 = load ptr, ptr %a.addr, align 8
# | 32: %1 = load ptr, ptr %b.addr, align 8
# | 33: %sub.ptr.lhs.cast = ptrtoaddr ptr %0 to i64
# | check:53'3 ? possible intended match
# | 34: %sub.ptr.rhs.cast = ptrtoaddr ptr %1 to i64
# | 35: %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
# | 36: %sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 4
# | 37: ret i64 %sub.ptr.div
# | 38: }
# | 39:
# | 40: attributes #0 = { noinline nounwind optnone "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
# | 41:
# | 42: !llvm.ident = !{!0}
# | 43:
# | 44: !0 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project ca564a398ea2d5e2403efc69529d78f5fcae20c2)"}
# | check:53'4 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>Clang.CIR/CodeGen/ptrdiff.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
/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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.cir
# 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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.cir
# note: command had no output on stdout or stderr
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=CIR
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.cir /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=CIR
# note: command had no output on stdout or stderr
# 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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp-cir.ll
# 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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp-cir.ll
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp-cir.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=LLVM
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp-cir.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=LLVM
# note: command had no output on stdout or stderr
# RUN: at line 5
/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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll
# 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/24/include -nostdsysteminc -std=c++20 -triple x86_64-unknown-linux-gnu -emit-llvm /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll
# note: command had no output on stdout or stderr
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=OGCG
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --input-file=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp --check-prefix=OGCG
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp:30:11: error: OGCG: expected string not found in input
# | // OGCG: %[[IA:.*]] = ptrtoint ptr %{{.*}} to i64
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll:7:43: note: scanning from here
# | define dso_local noundef i64 @_Z4sizePmS_(ptr noundef %_start, ptr noundef %_finish) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll:7:43: note: pattern attempts to capture variables: "IA"
# | define dso_local noundef i64 @_Z4sizePmS_(ptr noundef %_start, ptr noundef %_finish) #0 {
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll:15:14: note: possible intended match here
# | %sub.ptr.lhs.cast = ptrtoaddr ptr %0 to i64
# | ^
# |
# | Input file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/test/CIR/CodeGen/Output/ptrdiff.cpp.tmp.ll
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp'
# | 2: source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CIR/CodeGen/ptrdiff.cpp"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux-gnu"
# | 5:
# | 6: ; Function Attrs: mustprogress noinline nounwind optnone
# | 7: define dso_local noundef i64 @_Z4sizePmS_(ptr noundef %_start, ptr noundef %_finish) #0 {
# | check:30'0 { search range start (exclusive)
# | check:30'1 error: no match found in search range
# | check:30'2 pattern attempts to capture variables: "IA"
# | 8: entry:
# | 9: %_start.addr = alloca ptr, align 8
# | 10: %_finish.addr = alloca ptr, align 8
# | 11: store ptr %_start, ptr %_start.addr, align 8
# | 12: store ptr %_finish, ptr %_finish.addr, align 8
# | 13: %0 = load ptr, ptr %_finish.addr, align 8
# | 14: %1 = load ptr, ptr %_start.addr, align 8
# | 15: %sub.ptr.lhs.cast = ptrtoaddr ptr %0 to i64
# | check:30'3 ? possible intended match
# | 16: %sub.ptr.rhs.cast = ptrtoaddr ptr %1 to i64
# | 17: %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
# | 18: %sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
# | 19: ret i64 %sub.ptr.div
# | 20: }
# | 21:
# | 22: attributes #0 = { mustprogress noinline nounwind optnone "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-features"="+cx8,+mmx,+sse,+sse2,+x87" }
# | 23:
# | 24: !llvm.ident = !{!0}
# | 25:
# | 26: !0 = !{!"clang version 24.0.0git (https://github.com/llvm/llvm-project ca564a398ea2d5e2403efc69529d78f5fcae20c2)"}
# | check:30'4 } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# 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/220836
More information about the cfe-commits
mailing list