[llvm] [SROA] Do not canonicalize integer arrays to integers (PR #219416)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 03:01:05 PDT 2026


github-actions[bot] wrote:

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

* 181473 tests passed
* 3780 tests skipped
* 5 tests failed

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

### LLVM
<details>
<summary>LLVM.DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=sroa,verify -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll -o -  | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll --implicit-check-not="#dbg_"
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=sroa,verify -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll -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/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll '--implicit-check-not=#dbg_'
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll:19:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: %a.sroa.0 = alloca i64, align 8, !DIAssignID ![[ID_1:[0-9]+]]
# |               ^
# | <stdin>:8:7: note: scanning from here
# | entry:
# |       ^
# | <stdin>:8:7: note: pattern attempts to capture variables: "ID_1"
# | entry:
# |       ^
# | <stdin>:9:2: note: possible intended match here
# |  %a.sroa.0 = alloca [8 x i8], align 1, !DIAssignID !24
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            1: ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll' 
# |            2: source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/DebugInfo/Generic/assignment-tracking/sroa/alloca-single-slice.ll" 
# |            3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 
# |            4:  
# |            5: @c = dso_local global i32 0, align 4, !dbg !0 
# |            6:  
# |            7: define dso_local void @d() !dbg !12 { 
# |            8: entry: 
# | next:19'0          {   search range start (exclusive)
# | next:19'1              error: no match found in search range
# | next:19'2              pattern attempts to capture variables: "ID_1"
# |            9:  %a.sroa.0 = alloca [8 x i8], align 1, !DIAssignID !24 
# | next:19'3      ?                                                       possible intended match
# |           10:  #dbg_assign(i1 undef, !16, !DIExpression(), !24, ptr %a.sroa.0, !DIExpression(), !25) 
# |           11:  call void @llvm.lifetime.start.p0(ptr %a.sroa.0), !dbg !26 
# |           12:  %0 = load i32, ptr @c, align 4, !dbg !27 
# |           13:  %conv = sext i32 %0 to i64, !dbg !27 
# |           14:  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %a.sroa.0, ptr align 1 null, i64 %conv, i1 false), !dbg !28 
# |            .
# |            .
# |            .
# |           58: !24 = distinct !DIAssignID() 
# |           59: !25 = !DILocation(line: 0, scope: !12) 
# |           60: !26 = !DILocation(line: 6, column: 3, scope: !12) 
# |           61: !27 = !DILocation(line: 7, column: 18, scope: !12) 
# |           62: !28 = !DILocation(line: 7, column: 3, scope: !12) 
# |           63: !29 = !DILocation(line: 8, column: 1, scope: !12) 
# | next:19'4                                                       } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/SROA/addrspacecast.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/addrspacecast.ll -passes='sroa<preserve-cfg>' -S | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/addrspacecast.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt '-passes=sroa<preserve-cfg>' -S
# 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/llvm/test/Transforms/SROA/addrspacecast.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/addrspacecast.ll:93:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: [[CAST1:%.*]] = addrspacecast ptr [[X:%.*]] to ptr addrspace(1)
# |               ^
# | <stdin>:41:2: note: 'next' match was here
# |  %cast1 = addrspacecast ptr %x to ptr addrspace(1)
# |  ^
# | <stdin>:39:7: note: previous match ended here
# | entry:
# |       ^
# | <stdin>:40:1: note: non-matching line after previous match is here
# |  %a.sroa.2 = alloca [8 x i8], align 8
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/addrspacecast.ll:110:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: [[GEP_X:%.*]] = getelementptr [32 x i8], ptr [[X:%.*]], i32 0, i32 16
# |               ^
# | <stdin>:51:2: note: 'next' match was here
# |  %gep.x = getelementptr [32 x i8], ptr %x, i32 0, i32 16
# |  ^
# | <stdin>:49:7: note: previous match ended here
# | entry:
# |       ^
# | <stdin>:50:1: note: non-matching line after previous match is here
# |  %a.sroa.2 = alloca [8 x i8], align 8
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/addrspacecast.ll:130:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: [[GEP0_X:%.*]] = getelementptr [32 x i8], ptr [[X:%.*]], i32 0, i32 8
# |               ^
# | <stdin>:62:2: note: 'next' match was here
# |  %gep0.x = getelementptr [32 x i8], ptr %x, i32 0, i32 8
# |  ^
# | <stdin>:60:7: note: previous match ended here
# | entry:
# |       ^
# | <stdin>:61:1: note: non-matching line after previous match is here
# |  %a.sroa.2 = alloca [8 x i8], align 8
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/addrspacecast.ll:261:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[A_SROA_0:%.*]] = alloca i32, align 4
# |               ^
# | <stdin>:128:7: note: scanning from here
# | entry:
# |       ^
# | <stdin>:128:7: note: pattern attempts to capture variables: "A_SROA_0"
# | entry:
# |       ^
# | <stdin>:129:2: note: possible intended match here
# |  %a = alloca [4 x i8], align 1
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/addrspacecast.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            34: entry: 
# |            35:  ret i64 %X 
# |            36: } 
# |            37:  
# |            38: define i64 @getAdjustedPtr_addrspacecast_gep(ptr %x) { 
# |            39: entry: 
# | next:93'0           {   search range start (exclusive)
# |            40:  %a.sroa.2 = alloca [8 x i8], align 8 
# |            41:  %cast1 = addrspacecast ptr %x to ptr addrspace(1) 
# | next:93'1       !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   error: match on wrong line
# |            42:  %a.sroa.0.0.copyload = load i64, ptr addrspace(1) %cast1, align 1 
# |            43:  %a.sroa.2.0.cast1.sroa_idx = getelementptr inbounds i8, ptr addrspace(1) %cast1, i16 8 
# |            44:  call void @llvm.memcpy.p0.p1.i32(ptr align 8 %a.sroa.2, ptr addrspace(1) align 1 %a.sroa.2.0.cast1.sroa_idx, i32 8, i1 false) 
# |            45:  ret i64 %a.sroa.0.0.copyload 
# |            46: } 
# |            47:  
# |            48: define i64 @getAdjustedPtr_gep_addrspacecast(ptr %x) { 
# | next:93'2                                                   }           search range end (exclusive)
# |            49: entry: 
# | next:110'0          {   search range start (exclusive)
# |            50:  %a.sroa.2 = alloca [8 x i8], align 8 
# |            51:  %gep.x = getelementptr [32 x i8], ptr %x, i32 0, i32 16 
# | next:110'1      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   error: match on wrong line
# |            52:  %cast1 = addrspacecast ptr %gep.x to ptr addrspace(1) 
# |            53:  %a.sroa.0.0.copyload = load i64, ptr addrspace(1) %cast1, align 1 
# |            54:  %a.sroa.2.0.cast1.sroa_idx = getelementptr inbounds i8, ptr addrspace(1) %cast1, i16 8 
# |            55:  call void @llvm.memcpy.p0.p1.i32(ptr align 8 %a.sroa.2, ptr addrspace(1) align 1 %a.sroa.2.0.cast1.sroa_idx, i32 8, i1 false) 
# |            56:  ret i64 %a.sroa.0.0.copyload 
# |            57: } 
# |            58:  
# |            59: define i64 @getAdjustedPtr_gep_addrspacecast_gep(ptr %x) { 
# | next:110'2                                                      }           search range end (exclusive)
# |            60: entry: 
# | next:130'0          {   search range start (exclusive)
# |            61:  %a.sroa.2 = alloca [8 x i8], align 8 
# |            62:  %gep0.x = getelementptr [32 x i8], ptr %x, i32 0, i32 8 
# | next:130'1      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   error: match on wrong line
# |            63:  %cast1 = addrspacecast ptr %gep0.x to ptr addrspace(1) 
# |            64:  %gep1.x = getelementptr i8, ptr addrspace(1) %cast1, i32 8 
# |            65:  %a.sroa.0.0.copyload = load i64, ptr addrspace(1) %gep1.x, align 1 
# |            66:  %a.sroa.2.0.gep1.x.sroa_idx = getelementptr inbounds i8, ptr addrspace(1) %gep1.x, i16 8 
# |            67:  call void @llvm.memcpy.p0.p1.i32(ptr align 8 %a.sroa.2, ptr addrspace(1) align 1 %a.sroa.2.0.gep1.x.sroa_idx, i32 8, i1 false) 
# |            68:  ret i64 %a.sroa.0.0.copyload 
# |            69: } 
# |            70:  
# |            71: define i64 @alloca_addrspacecast_bitcast_volatile_store(i64 %X) { 
# | next:130'2                                                             }           search range end (exclusive)
# |            72: entry: 
# |            73:  %A.sroa.0 = alloca i64, align 8 
# |            74:  %0 = addrspacecast ptr %A.sroa.0 to ptr addrspace(1) 
# |            75:  store volatile i64 %X, ptr addrspace(1) %0, align 8 
# |            76:  %A.sroa.0.0.A.sroa.0.0.Z = load i64, ptr %A.sroa.0, align 8 
# |             .
# |             .
# |             .
# |           123:  %a.sroa.0.0.a.sroa.0.0.val = load i32, ptr %a.sroa.0, align 4 
# |           124:  ret i32 %a.sroa.0.0.a.sroa.0.0.val 
# |           125: } 
# |           126:  
# |           127: define void @volatile_memcpy(ptr %src, ptr %dst) { 
# |           128: entry: 
# | next:261'0          {   search range start (exclusive)
# | next:261'1              error: no match found in search range
# | next:261'2              pattern attempts to capture variables: "A_SROA_0"
# |           129:  %a = alloca [4 x i8], align 1 
# | next:261'3      ?                               possible intended match
# |           130:  %asc = addrspacecast ptr %a to ptr addrspace(1) 
# |           131:  call void @llvm.memcpy.p1.p0.i32(ptr addrspace(1) %asc, ptr %src, i32 4, i1 true), !tbaa !0 
# |           132:  call void @llvm.memcpy.p0.p1.i32(ptr %dst, ptr addrspace(1) %asc, i32 4, i1 true), !tbaa !3 
# |           133:  ret void 
# |           134: } 
# |           135:  
# |           136: define void @select_addrspacecast(i1 %a, i1 %b) { 
# | next:261'4                                       }                 search range end (exclusive)
# |           137:  ret void 
# |           138: } 
# |           139:  
# |           140: define void @select_addrspacecast_const_op(i1 %a, i1 %b) { 
# |           141:  %c = alloca i64, align 8 
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/SROA/basictest.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/basictest.ll -passes='sroa<preserve-cfg>' -S | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/basictest.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt '-passes=sroa<preserve-cfg>' -S
# 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/llvm/test/Transforms/SROA/basictest.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/basictest.ll:313:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: [[A_SROA_2_SROA_4:%.*]] = alloca [7 x i8], align 1
# |               ^
# | <stdin>:169:2: note: 'next' match was here
# |  %a.sroa.2.sroa.4 = alloca [7 x i8], align 1
# |  ^
# | <stdin>:167:39: note: previous match ended here
# |  %a.sroa.0 = alloca [20 x i8], align 1
# |                                       ^
# | <stdin>:168:1: note: non-matching line after previous match is here
# |  %a.sroa.2.sroa.0 = alloca [2 x i8], align 1
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/basictest.ll:445:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[A_SROA_0:%.*]] = alloca i32, align 4
# |               ^
# | <stdin>:266:7: note: scanning from here
# | entry:
# |       ^
# | <stdin>:266:7: note: pattern attempts to capture variables: "A_SROA_0"
# | entry:
# |       ^
# | <stdin>:267:2: note: possible intended match here
# |  %a = alloca [4 x i8], align 1
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/basictest.ll:751:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: [[A_SROA_33:%.*]] = alloca [34 x i8], align 1
# |               ^
# | <stdin>:381:2: note: 'next' match was here
# |  %a.sroa.32 = alloca [34 x i8], align 1
# |  ^
# | <stdin>:379:7: note: previous match ended here
# | entry:
# |       ^
# | <stdin>:380:1: note: non-matching line after previous match is here
# |  %a.sroa.3 = alloca [4 x i8], align 1
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/basictest.ll:1331:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP_SROA_0:%.*]] = alloca i32, align 4
# |               ^
# | <stdin>:605:7: note: scanning from here
# | entry:
# |       ^
# | <stdin>:605:7: note: pattern attempts to capture variables: "TMP_SROA_0"
# | entry:
# |       ^
# | <stdin>:606:5: note: possible intended match here
# |  %tmp = alloca [4 x i8], align 1
# |     ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/basictest.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            162:  ret void 
# |            163: } 
# |            164:  
# |            165: define void @test4(ptr %dst, ptr %src) { 
# |            166: entry: 
# |            167:  %a.sroa.0 = alloca [20 x i8], align 1 
# | next:313'0                                           {   search range start (exclusive)
# |            168:  %a.sroa.2.sroa.0 = alloca [2 x i8], align 1 
# |            169:  %a.sroa.2.sroa.4 = alloca [7 x i8], align 1 
# | next:313'1       !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   error: match on wrong line
# |            170:  %a.sroa.3 = alloca [10 x i8], align 1 
# |            171:  %a.sroa.31.sroa.0 = alloca [2 x i8], align 1 
# |            172:  %a.sroa.31.sroa.5 = alloca [7 x i8], align 1 
# |            173:  %a.sroa.6.sroa.0 = alloca [2 x i8], align 1 
# |            174:  %a.sroa.6.sroa.4 = alloca [7 x i8], align 1 
# |              .
# |              .
# |              .
# |            236: declare void @llvm.memmove.p0.p0.i32(ptr writeonly captures(none), ptr readonly captures(none), i32, i1 immarg) #0 
# |            237:  
# |            238: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: write) 
# |            239: declare void @llvm.memset.p0.i32(ptr writeonly captures(none), i8, i32, i1 immarg) #1 
# |            240:  
# |            241: define i16 @test5() { 
# | next:313'2                        }     search range end (exclusive)
# |            242: entry: 
# |            243:  %0 = bitcast float 0.000000e+00 to i32 
# |            244:  %a.sroa.0.2.extract.shift = lshr i32 %0, 16 
# |            245:  %a.sroa.0.2.extract.trunc = trunc i32 %a.sroa.0.2.extract.shift to i16 
# |            246:  ret i16 %a.sroa.0.2.extract.trunc 
# |              .
# |              .
# |              .
# |            261:  %a.sroa.0.0.a.sroa.0.0.val = load i32, ptr %a.sroa.0, align 4 
# |            262:  ret i32 %a.sroa.0.0.a.sroa.0.0.val 
# |            263: } 
# |            264:  
# |            265: define void @test7(ptr %src, ptr %dst) { 
# |            266: entry: 
# | next:445'0           {   search range start (exclusive)
# | next:445'1               error: no match found in search range
# | next:445'2               pattern attempts to capture variables: "A_SROA_0"
# |            267:  %a = alloca [4 x i8], align 1 
# | next:445'3       ?                               possible intended match
# |            268:  call void @llvm.memcpy.p0.p0.i32(ptr %a, ptr %src, i32 4, i1 true), !tbaa !0 
# |            269:  call void @llvm.memcpy.p0.p0.i32(ptr %dst, ptr %a, i32 4, i1 true), !tbaa !3 
# |            270:  ret void 
# |            271: } 
# |            272:  
# |            273: define %S2 @test8(ptr %arg) { 
# | next:445'4                        }             search range end (exclusive)
# |            274: entry: 
# |            275:  %s2.next.ptr = getelementptr %S2, ptr %arg, i64 0, i32 1 
# |            276:  %s2.next = load ptr, ptr %s2.next.ptr, align 8, !tbaa !0 
# |            277:  %s2.next.s1 = load ptr, ptr %s2.next, align 8, !tbaa !3 
# |            278:  %s2.next.next.ptr = getelementptr %S2, ptr %s2.next, i64 0, i32 1 
# |              .
# |              .
# |              .
# |            374:  call void @llvm.memcpy.p0.p0.i32(ptr %dst, ptr %a, i32 4, i1 true), !tbaa !3 
# |            375:  ret void 
# |            376: } 
# |            377:  
# |            378: define void @test18(ptr %src, ptr %dst, i32 %size) { 
# |            379: entry: 
# | next:751'0           {   search range start (exclusive)
# |            380:  %a.sroa.3 = alloca [4 x i8], align 1 
# |            381:  %a.sroa.32 = alloca [34 x i8], align 1 
# | next:751'1       !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   error: match on wrong line
# |            382:  %a.sroa.0.0.copyload = load i32, ptr %src, align 1, !tbaa !0 
# |            383:  %a.sroa.3.0.src.sroa_idx = getelementptr inbounds i8, ptr %src, i64 4 
# |            384:  call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a.sroa.3, ptr align 1 %a.sroa.3.0.src.sroa_idx, i32 4, i1 false), !tbaa !0 
# |            385:  call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a.sroa.32, ptr %src, i32 %size, i1 false), !tbaa !3 
# |            386:  call void @llvm.memset.p0.i32(ptr align 1 %a.sroa.32, i8 42, i32 %size, i1 false), !tbaa !5 
# |            387:  store i32 42, ptr %dst, align 1, !tbaa !9 
# |            388:  %a.sroa.3.0.dst.sroa_idx = getelementptr inbounds i8, ptr %dst, i64 4 
# |            389:  call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a.sroa.3.0.dst.sroa_idx, ptr align 1 %a.sroa.3, i32 4, i1 false), !tbaa !9 
# |            390:  call void @llvm.memcpy.p0.p0.i32(ptr %dst, ptr align 1 %a.sroa.32, i32 %size, i1 false), !tbaa !11 
# |            391:  ret void 
# |            392: } 
# |            393:  
# |            394: define i64 @test19(ptr %x) { 
# | next:751'2                         }           search range end (exclusive)
# |            395: entry: 
# |            396:  %a.sroa.0.0.copyload = load i64, ptr %x, align 1 
# |            397:  %a.sroa.2.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 8 
# |            398:  %a.sroa.2.0.copyload = load ptr, ptr %a.sroa.2.0.x.sroa_idx, align 1 
# |            399:  ret i64 %a.sroa.0.0.copyload 
# |              .
# |              .
# |              .
# |            600:  %a.0.v = load i32, ptr %a, align 4 
# |            601:  ret i32 %a.0.v 
# |            602: } 
# |            603:  
# |            604: define void @PR15674(ptr %data, ptr %src, i32 %size) { 
# |            605: entry: 
# | next:1331'0          {   search range start (exclusive)
# | next:1331'1              error: no match found in search range
# | next:1331'2              pattern attempts to capture variables: "TMP_SROA_0"
# |            606:  %tmp = alloca [4 x i8], align 1 
# | next:1331'3         ?                              possible intended match
# |            607:  switch i32 %size, label %end [ 
# |            608:  i32 4, label %bb4 
# |            609:  i32 3, label %bb3 
# |            610:  i32 2, label %bb2 
# |            611:  i32 1, label %bb1 
# |              .
# |              .
# |              .
# |            640: end: ; preds = %bb1, %entry 
# |            641:  call void @llvm.memcpy.p0.p0.i32(ptr %data, ptr align 1 %tmp, i32 %size, i1 false) 
# |            642:  ret void 
# |            643: } 
# |            644:  
# |            645: define void @PR15805(i1 %a, i1 %b) { 
# | next:1331'4                          }                 search range end (exclusive)
# |            646:  %c = alloca i64, align 8 
# |            647:  %cond.in = select i1 %b, ptr %c, ptr %c 
# |            648:  %cond = load i64, ptr %cond.in, align 8 
# |            649:  ret void 
# |            650: } 
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/SROA/tbaa-struct3.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -p sroa -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/tbaa-struct3.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/tbaa-struct3.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -p sroa -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/tbaa-struct3.ll
# 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/llvm/test/Transforms/SROA/tbaa-struct3.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/tbaa-struct3.ll:314:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP_SROA_3:%.*]] = alloca i64, align 8
# |               ^
# | <stdin>:164:38: note: scanning from here
# |  %tmp.sroa.0 = alloca double, align 8
# |                                      ^
# | <stdin>:164:38: note: pattern attempts to capture variables: "TMP_SROA_3"
# |  %tmp.sroa.0 = alloca double, align 8
# |                                      ^
# | <stdin>:165:11: note: possible intended match here
# |  %tmp.sroa.3 = alloca [8 x i8], align 8
# |           ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/tbaa-struct3.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           159:  call void @llvm.memcpy.p0.p0.i32(ptr align 1 %a.sroa.4.1.dst.sroa_idx, ptr align 1 %a.sroa.4, i32 5, i1 true) 
# |           160:  ret void 
# |           161: } 
# |           162:  
# |           163: define double @tbaa_struct_load(ptr %src, ptr %dst) { 
# |           164:  %tmp.sroa.0 = alloca double, align 8 
# | next:314'0                                         {   search range start (exclusive)
# | next:314'1                                             error: no match found in search range
# | next:314'2                                             pattern attempts to capture variables: "TMP_SROA_3"
# |           165:  %tmp.sroa.3 = alloca [8 x i8], align 8 
# | next:314'3               ?                               possible intended match
# |           166:  %tmp.sroa.0.0.copyload = load double, ptr %src, align 8 
# |           167:  store double %tmp.sroa.0.0.copyload, ptr %tmp.sroa.0, align 8 
# |           168:  %tmp.sroa.3.0.src.sroa_idx = getelementptr inbounds i8, ptr %src, i64 8 
# |           169:  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %tmp.sroa.3, ptr align 8 %tmp.sroa.3.0.src.sroa_idx, i64 8, i1 false) 
# |           170:  %tmp.sroa.0.0.tmp.sroa.0.0.lg = load double, ptr %tmp.sroa.0, align 8, !tbaa !5 
# |           171:  %tmp.sroa.0.0.tmp.sroa.0.0.copyload1 = load volatile double, ptr %tmp.sroa.0, align 8 
# |           172:  store volatile double %tmp.sroa.0.0.tmp.sroa.0.0.copyload1, ptr %dst, align 8 
# |           173:  %tmp.sroa.3.0.dst.sroa_idx = getelementptr inbounds i8, ptr %dst, i64 8 
# |           174:  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %tmp.sroa.3.0.dst.sroa_idx, ptr align 8 %tmp.sroa.3, i64 8, i1 true) 
# |           175:  ret double %tmp.sroa.0.0.tmp.sroa.0.0.lg 
# |           176: } 
# |           177:  
# |           178: define i32 @shorten_integer_store_single_field(ptr %dst, ptr %dst.2, ptr %src) { 
# | next:314'4                                                    }                                   search range end (exclusive)
# |           179: entry: 
# |           180:  %a.sroa.0 = alloca i32, align 4 
# |           181:  store i32 123, ptr %a.sroa.0, align 4, !tbaa !0 
# |           182:  %a.sroa.0.0.a.sroa.0.0.l = load i32, ptr %a.sroa.0, align 4 
# |           183:  %a.sroa.0.0.a.sroa.0.0.copyload = load volatile i32, ptr %a.sroa.0, align 4 
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/SROA/vector-promotion.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/vector-promotion.ll -passes='sroa<preserve-cfg>' -S | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/vector-promotion.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt '-passes=sroa<preserve-cfg>' -S
# 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/llvm/test/Transforms/SROA/vector-promotion.ll --check-prefixes=CHECK,CHECK-PRESERVE-CFG
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/vector-promotion.ll:1165:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP_SROA_0_0_COPYLOAD:%.*]] = load i64, ptr [[X:%.*]], align 1
# |               ^
# | <stdin>:295:26: note: scanning from here
# | define void @swap-8bytes(ptr %x, ptr %y) {
# |                          ^
# | <stdin>:295:26: note: pattern attempts to capture variables: "TMP_SROA_0_0_COPYLOAD", "X"
# | define void @swap-8bytes(ptr %x, ptr %y) {
# |                          ^
# | <stdin>:296:2: note: possible intended match here
# |  %tmp = alloca [2 x i32], align 4
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/SROA/vector-promotion.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            290:  store <2 x i64> <i64 0, i64 -1>, ptr %a.sroa.0, align 32 
# |            291:  %a.sroa.0.0.a.sroa.0.0.l = load i1, ptr %a.sroa.0, align 32 
# |            292:  ret i1 %a.sroa.0.0.a.sroa.0.0.l 
# |            293: } 
# |            294:  
# |            295: define void @swap-8bytes(ptr %x, ptr %y) { 
# | next:1165'0                             {                    search range start (exclusive)
# | next:1165'1                                                  error: no match found in search range
# | next:1165'2                                                  pattern attempts to capture variables: "TMP_SROA_0_0_COPYLOAD", "X"
# |            296:  %tmp = alloca [2 x i32], align 4 
# | next:1165'3      ?                                  possible intended match
# |            297:  call void @llvm.memcpy.p0.p0.i64(ptr %tmp, ptr %x, i64 8, i1 false) 
# |            298:  tail call void @llvm.memcpy.p0.p0.i64(ptr %x, ptr %y, i64 8, i1 false) 
# |            299:  call void @llvm.memcpy.p0.p0.i64(ptr %y, ptr %tmp, i64 8, i1 false) 
# |            300:  ret void 
# |            301: } 
# |            302:  
# |            303: define void @swap-7bytes(ptr %x, ptr %y) { 
# | next:1165'4                              }                   search range end (exclusive)
# |            304:  %tmp = alloca [7 x i8], align 1 
# |            305:  call void @llvm.memcpy.p0.p0.i64(ptr %tmp, ptr %x, i64 7, i1 false) 
# |            306:  tail call void @llvm.memcpy.p0.p0.i64(ptr %x, ptr %y, i64 7, i1 false) 
# |            307:  call void @llvm.memcpy.p0.p0.i64(ptr %y, ptr %tmp, i64 7, i1 false) 
# |            308:  ret void 
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# 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/219416


More information about the llvm-commits mailing list