[llvm-branch-commits] [clang] [Clang] Fix __builtin_clear_padding() for bitfields (PR #216063)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 13 08:02:11 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 90780 tests passed
* 1780 tests skipped
* 1 test failed

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

### Clang
<details>
<summary>Clang.CodeGen/builtin-clear-padding-codegen.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/24/include -nostdsysteminc -std=c11 -triple=x86_64-linux-gnu -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.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/builtin-clear-padding-codegen.c --check-prefix=LINUX
# 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=c11 -triple=x86_64-linux-gnu -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.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/builtin-clear-padding-codegen.c --check-prefix=LINUX
# 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=c11 -triple=x86_64-pc-windows-msvc -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.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/builtin-clear-padding-codegen.c --check-prefix=WINDOWS
# 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=c11 -triple=x86_64-pc-windows-msvc -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.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/builtin-clear-padding-codegen.c --check-prefix=WINDOWS
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.c:313:45: error: undefined variable: ATTR0
# | // WINDOWS-SAME: ptr noundef [[BI:%.*]]) #[[ATTR0]] {
# |                                             ^
# | <stdin>:63:46: note: pattern attempts to capture variables: "BI"
# | define dso_local void @testBitIntByteAligned(ptr noundef %bi) #0 {
# |                                              ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.c:386:45: error: undefined variable: ATTR0
# | // WINDOWS-SAME: ptr noundef [[BI:%.*]]) #[[ATTR0]] {
# |                                             ^
# | <stdin>:74:43: note: pattern attempts to capture variables: "BI"
# | define dso_local void @testVolatileBitInt(ptr noundef %bi) #0 {
# |                                           ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.c:1371:44: error: undefined variable: ATTR0
# | // WINDOWS-SAME: ptr noundef [[S:%.*]]) #[[ATTR0]] {
# |                                            ^
# | <stdin>:216:46: note: pattern attempts to capture variables: "S"
# | define dso_local void @testVolatileBitfields(ptr noundef %s) #0 {
# |                                              ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.c:1507:44: error: undefined variable: ATTR0
# | // WINDOWS-SAME: ptr noundef [[S:%.*]]) #[[ATTR0]] {
# |                                            ^
# | <stdin>:249:60: note: pattern attempts to capture variables: "S"
# | define dso_local void @testVolatileBitfieldsVolatileStruct(ptr noundef %s) #0 {
# |                                                            ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/builtin-clear-padding-codegen.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |             58:  store i8 0, ptr %6, align 1 
# |             59:  ret void 
# |             60: } 
# |             61:  
# |             62: ; Function Attrs: noinline nounwind optnone 
# |             63: define dso_local void @testBitIntByteAligned(ptr noundef %bi) #0 { 
# | same:313'0                                                  {                        search range start (exclusive)
# | same:313'1                                                                           error: match failed for invalid pattern
# | same:313'2                                                                           undefined variable: ATTR0
# | same:313'3                                                                           pattern attempts to capture variables: "BI"
# |             64: entry: 
# |             65:  %bi.addr = alloca ptr, align 8 
# |             66:  store ptr %bi, ptr %bi.addr, align 8 
# |             67:  %0 = load ptr, ptr %bi.addr, align 8 
# |             68:  %1 = getelementptr i8, ptr %0, i32 3 
# |             69:  store i8 0, ptr %1, align 1 
# |             70:  ret void 
# |             71: } 
# |             72:  
# |             73: ; Function Attrs: noinline nounwind optnone 
# |             74: define dso_local void @testVolatileBitInt(ptr noundef %bi) #0 { 
# | same:313'4                                                }                       search range end (exclusive)
# | same:386'0                                               {                        search range start (exclusive)
# | same:386'1                                                                        error: match failed for invalid pattern
# | same:386'2                                                                        undefined variable: ATTR0
# | same:386'3                                                                        pattern attempts to capture variables: "BI"
# |             75: entry: 
# |             76:  %bi.addr = alloca ptr, align 8 
# |             77:  store ptr %bi, ptr %bi.addr, align 8 
# |             78:  %0 = load ptr, ptr %bi.addr, align 8 
# |             79:  %1 = getelementptr i8, ptr %0, i32 12 
# |              .
# |              .
# |              .
# |             88:  store i8 0, ptr %6, align 1 
# |             89:  ret void 
# |             90: } 
# |             91:  
# |             92: ; Function Attrs: noinline nounwind optnone 
# |             93: define dso_local void @testPrimitiveComplexLongDouble(ptr noundef %c) #0 { 
# | same:386'4                                                                                }  search range end (exclusive)
# |             94: entry: 
# |             95:  %c.addr = alloca ptr, align 8 
# |             96:  store ptr %c, ptr %c.addr, align 8 
# |             97:  %0 = load ptr, ptr %c.addr, align 8 
# |             98:  ret void 
# |              .
# |              .
# |              .
# |            211:  store i8 %3, ptr %1, align 1 
# |            212:  ret void 
# |            213: } 
# |            214:  
# |            215: ; Function Attrs: noinline nounwind optnone 
# |            216: define dso_local void @testVolatileBitfields(ptr noundef %s) #0 { 
# | same:1371'0                                                 {                       search range start (exclusive)
# | same:1371'1                                                                         error: match failed for invalid pattern
# | same:1371'2                                                                         undefined variable: ATTR0
# | same:1371'3                                                                         pattern attempts to capture variables: "S"
# |            217: entry: 
# |            218:  %s.addr = alloca ptr, align 8 
# |            219:  store ptr %s, ptr %s.addr, align 8 
# |            220:  %0 = load ptr, ptr %s.addr, align 8 
# |            221:  %1 = getelementptr i8, ptr %0, i32 0 
# |              .
# |              .
# |              .
# |            244:  store i8 %15, ptr %13, align 1 
# |            245:  ret void 
# |            246: } 
# |            247:  
# |            248: ; Function Attrs: noinline nounwind optnone 
# |            249: define dso_local void @testVolatileBitfieldsVolatileStruct(ptr noundef %s) #0 { 
# | same:1371'4                                                                }                      search range end (exclusive)
# | same:1507'0                                                               {                       search range start (exclusive)
# | same:1507'1                                                                                       error: match failed for invalid pattern
# | same:1507'2                                                                                       undefined variable: ATTR0
# | same:1507'3                                                                                       pattern attempts to capture variables: "S"
# |            250: entry: 
# |            251:  %s.addr = alloca ptr, align 8 
# |            252:  store ptr %s, ptr %s.addr, align 8 
# |            253:  %0 = load ptr, ptr %s.addr, align 8 
# |            254:  %1 = getelementptr i8, ptr %0, i32 0 
# |              .
# |              .
# |              .
# |            277:  store i8 %15, ptr %13, align 1 
# |            278:  ret void 
# |            279: } 
# |            280:  
# |            281: ; Function Attrs: noinline nounwind optnone 
# |            282: define dso_local void @testArrayNoPadding() #0 { 
# | same:1507'4                                                     }  search range end (exclusive)
# |            283: entry: 
# |            284:  %i = alloca [4 x i32], align 4 
# |            285:  ret void 
# |            286: } 
# |            287:  
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# 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/216063


More information about the llvm-branch-commits mailing list