[clang] [Clang][CodeGen] Emit alignment information for indirect arguments (PR #201999)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 6 06:58:40 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 54119 tests passed
* 1291 tests skipped
* 2 tests failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.CodeGen/RISCV/riscv-vector-callingconv-llvm-ir.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -triple riscv64 -target-feature +v    -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.c -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefix=CHECK-LLVM C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.c
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -triple riscv64 -target-feature +v -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.c' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefix=CHECK-LLVM 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.c'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.c:191:16: error: CHECK-LLVM: expected string not found in input
# | // CHECK-LLVM: define dso_local riscv_vls_cc(128) void @test_st_i32x4x9(ptr noundef align 512 dead_on_return %arg)
# |                ^
# | <stdin>:609:132: note: scanning from here
# | define dso_local riscv_vls_cc(256) void @test_st_i32x4x8_256(target("riscv.vector.tuple", <vscale x 4 x i8>, 8) %arg.target_coerce) #0 {
# |                                                                                                                                    ^
# | <stdin>:648:1: note: possible intended match here
# | define dso_local riscv_vls_cc(128) void @test_st_i32x4x9(ptr noundef align 16 dead_on_return %arg) #0 {
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            604:  store <4 x i32> %22, ptr %23, align 16 
# |            605:  ret void 
# |            606: } 
# |            607:  
# |            608: ; Function Attrs: noinline nounwind optnone vscale_range(2,1024) 
# |            609: define dso_local riscv_vls_cc(256) void @test_st_i32x4x8_256(target("riscv.vector.tuple", <vscale x 4 x i8>, 8) %arg.target_coerce) #0 { 
# | check:191'0                                                                                                                                        X~~~~~ error: no match found
# |            610: entry: 
# | check:191'0     ~~~~~~~
# |            611:  %arg = alloca %struct.st_i32x4x8, align 16 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            612:  %0 = call <vscale x 1 x i32> @llvm.riscv.tuple.extract.nxv1i32.triscv.vector.tuple_nxv4i8_8t(target("riscv.vector.tuple", <vscale x 4 x i8>, 8) %arg.target_coerce, i32 0) 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            613:  %1 = call <4 x i32> @llvm.vector.extract.v4i32.nxv1i32(<vscale x 1 x i32> %0, i64 0) 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            614:  %2 = getelementptr inbounds nuw %struct.st_i32x4x8, ptr %arg, i32 0, i32 0 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            643:  store <4 x i32> %22, ptr %23, align 16 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            644:  ret void 
# | check:191'0     ~~~~~~~~~~
# |            645: } 
# | check:191'0     ~~
# |            646:  
# | check:191'0     ~
# |            647: ; Function Attrs: noinline nounwind optnone vscale_range(2,1024) 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            648: define dso_local riscv_vls_cc(128) void @test_st_i32x4x9(ptr noundef align 16 dead_on_return %arg) #0 { 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:191'1     ?                                                                                                        possible intended match
# |            649: entry: 
# | check:191'0     ~~~~~~~
# |            650:  %arg.indirect_addr = alloca ptr, align 8 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            651:  store ptr %arg, ptr %arg.indirect_addr, align 8 
# | check:191'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            652:  ret void 
# | check:191'0     ~~~~~~~~~~
# |            653: } 
# | check:191'0     ~~
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>Clang.CodeGen/RISCV/riscv-vector-callingconv-llvm-ir.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -std=c++11 -triple riscv64 -target-feature +v    -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.cpp -o - | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefix=CHECK-LLVM C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -std=c++11 -triple riscv64 -target-feature +v -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.cpp' -o -
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefix=CHECK-LLVM 'C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.cpp:156:16: error: CHECK-LLVM: expected string not found in input
# | // CHECK-LLVM: define dso_local riscv_vls_cc(128) void @_Z16test_st_i32x64x211st_i32x64x2(ptr noundef dead_on_return %arg)
# |                ^
# | <stdin>:436:148: note: scanning from here
# | define dso_local riscv_vls_cc(256) void @_Z19test_st_i32x8x2_25610st_i32x8x2(target("riscv.vector.tuple", <vscale x 8 x i8>, 2) %arg.target_coerce) #0 {
# |                                                                                                                                                    ^
# | <stdin>:454:1: note: possible intended match here
# | define dso_local riscv_vls_cc(128) void @_Z16test_st_i32x64x211st_i32x64x2(ptr noundef align 256 dead_on_return %arg) #0 {
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\CodeGen\RISCV\riscv-vector-callingconv-llvm-ir.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            431:  
# |            432: ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) 
# |            433: declare <8 x i32> @llvm.vector.extract.v8i32.nxv4i32(<vscale x 4 x i32>, i64 immarg) #4 
# |            434:  
# |            435: ; Function Attrs: mustprogress noinline nounwind optnone vscale_range(2,1024) 
# |            436: define dso_local riscv_vls_cc(256) void @_Z19test_st_i32x8x2_25610st_i32x8x2(target("riscv.vector.tuple", <vscale x 8 x i8>, 2) %arg.target_coerce) #0 { 
# | check:156'0                                                                                                                                                        X~~~~~ error: no match found
# |            437: entry: 
# | check:156'0     ~~~~~~~
# |            438:  %arg = alloca %struct.st_i32x8x2, align 32 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            439:  %0 = call <vscale x 2 x i32> @llvm.riscv.tuple.extract.nxv2i32.triscv.vector.tuple_nxv8i8_2t(target("riscv.vector.tuple", <vscale x 8 x i8>, 2) %arg.target_coerce, i32 0) 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            440:  %1 = call <8 x i32> @llvm.vector.extract.v8i32.nxv2i32(<vscale x 2 x i32> %0, i64 0) 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            441:  %2 = getelementptr inbounds nuw %struct.st_i32x8x2, ptr %arg, i32 0, i32 0 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            449:  
# | check:156'0     ~
# |            450: ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            451: declare <8 x i32> @llvm.vector.extract.v8i32.nxv2i32(<vscale x 2 x i32>, i64 immarg) #4 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            452:  
# | check:156'0     ~
# |            453: ; Function Attrs: mustprogress noinline nounwind optnone vscale_range(2,1024) 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            454: define dso_local riscv_vls_cc(128) void @_Z16test_st_i32x64x211st_i32x64x2(ptr noundef align 256 dead_on_return %arg) #0 { 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:156'1     ?                                                                                                                           possible intended match
# |            455: entry: 
# | check:156'0     ~~~~~~~
# |            456:  %arg.indirect_addr = alloca ptr, align 8 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            457:  store ptr %arg, ptr %arg.indirect_addr, align 8 
# | check:156'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            458:  ret void 
# | check:156'0     ~~~~~~~~~~
# |            459: } 
# | check:156'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/201999


More information about the cfe-commits mailing list