Skip to content

[experiment] remove attributes from Terminator - #161167

Closed
panstromek wants to merge 1 commit into
rust-lang:mainfrom
panstromek:remove-attributes-experiment
Closed

[experiment] remove attributes from Terminator#161167
panstromek wants to merge 1 commit into
rust-lang:mainfrom
panstromek:remove-attributes-experiment

Conversation

@panstromek

Copy link
Copy Markdown
Contributor

I'm getting a lot of mixed signals from it, so I want to get some baseline measurement to see the true cost.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 16, 2026
@panstromek

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 16, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Aug 16, 2026
[experiment] remove attributes from Terminator
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

---- [codegen] tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs stdout ----
------FileCheck stdout------------------------------

------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs:17:12: error: CHECK: expected string not found in input
 // CHECK: !llvm.loop ![[HINT:[0-9]+]]
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:14:25: note: scanning from here
define void @unroll_hint() unnamed_addr #1 {
                        ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:30:24: note: possible intended match here
 %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1)
                       ^
/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs:27:12: error: CHECK: expected string not found in input
 // CHECK: !llvm.loop ![[FULL:[0-9]+]]
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:46:25: note: scanning from here
define void @unroll_full() unnamed_addr #1 {
                        ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:62:24: note: possible intended match here
 %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1)
                       ^
/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs:37:12: error: CHECK: expected string not found in input
 // CHECK: !llvm.loop ![[DISABLE:[0-9]+]]
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:78:26: note: scanning from here
define void @unroll_never() unnamed_addr #1 {
                         ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:94:24: note: possible intended match here
 %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1)
                       ^
/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs:47:12: error: CHECK: expected string not found in input
 // CHECK: !llvm.loop ![[COUNT:[0-9]+]]
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:110:26: note: scanning from here
define void @unroll_count() unnamed_addr #1 {
                         ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:157:1: note: possible intended match here
!llvm.module.flags = !{!0, !1, !2}
^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll
Check file: /checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'unroll_for_metadata.bab16875355ff105-cgu.0' 
            2: source_filename = "unroll_for_metadata.bab16875355ff105-cgu.0" 
            3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" 
            4: target triple = "aarch64-unknown-linux-gnu" 
            5:  
            6: ; core::intrinsics::cold_path 
            7: ; Function Attrs: cold nounwind uwtable 
            8: define internal void @_RNvNtCs42Cx8Inlo83_4core10intrinsics9cold_path() unnamed_addr #0 { 
            9: start: 
           10:  ret void 
           11: } 
           12:  
           13: ; Function Attrs: uwtable 
           14: define void @unroll_hint() unnamed_addr #1 { 
check:17'0                             X~~~~~~~~~~~~~~~~~~~~ error: no match found
           15: start: 
check:17'0     ~~~~~~~
           16:  %iter = alloca [4 x i8], align 4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           17:  store i32 0, ptr %iter, align 4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           18:  br label %bb1 
check:17'0     ~~~~~~~~~~~~~~~
           19:  
check:17'0     ~
           20: bb1: ; preds = %bb7, %start 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           21:  %_3 = load i32, ptr %iter, align 4, !noundef !4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           22:  %_2 = icmp slt i32 %_3, 10 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           23:  br i1 %_2, label %bb3, label %bb4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           24:  
check:17'0     ~
           25: bb4: ; preds = %bb1 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           26:  ret void 
check:17'0     ~~~~~~~~~~
           27:  
check:17'0     ~
           28: bb3: ; preds = %bb1 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           29:  %0 = load i32, ptr %iter, align 4, !noundef !4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30:  %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1) 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:17'1                            ?                                            possible intended match
           31:  %_6.0 = extractvalue { i32, i1 } %1, 0 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           32:  %_6.1 = extractvalue { i32, i1 } %1, 1 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           33:  store i32 %_6.0, ptr %iter, align 4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           34:  %2 = call i1 @llvm.expect.i1(i1 %_6.1, i1 false) 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           35:  br i1 %2, label %bb5, label %bb7 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           36:  
check:17'0     ~
           37: bb7: ; preds = %bb3 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           38:  call void @maybe_has_side_effect() #5 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           39:  br label %bb1 
check:17'0     ~~~~~~~~~~~~~~~
           40:  
check:17'0     ~
           41: bb5: ; preds = %bb3 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           42:  unreachable 
check:17'0     ~~~~~~~~~~~~~
           43: } 
check:17'0     ~~
           44:  
check:17'0     ~
           45: ; Function Attrs: uwtable 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           46: define void @unroll_full() unnamed_addr #1 { 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~
check:27'0                             X~~~~~~~~~~~~~~~~~~~~ error: no match found
           47: start: 
check:27'0     ~~~~~~~
           48:  %iter = alloca [4 x i8], align 4 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           49:  store i32 0, ptr %iter, align 4 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           50:  br label %bb1 
check:27'0     ~~~~~~~~~~~~~~~
           51:  
check:27'0     ~
           52: bb1: ; preds = %bb7, %start 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           53:  %_3 = load i32, ptr %iter, align 4, !noundef !4 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           54:  %_2 = icmp slt i32 %_3, 10 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           55:  br i1 %_2, label %bb3, label %bb4 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           56:  
check:27'0     ~
           57: bb4: ; preds = %bb1 
check:27'0     ~~~~~~~~~~~~~~~~~~~~
           58:  ret void 
check:27'0     ~~~~~~~~~~
           59:  
check:27'0     ~
           60: bb3: ; preds = %bb1 
check:27'0     ~~~~~~~~~~~~~~~~~~~~
           61:  %0 = load i32, ptr %iter, align 4, !noundef !4 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           62:  %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1) 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:27'1                            ?                                            possible intended match
           63:  %_6.0 = extractvalue { i32, i1 } %1, 0 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           64:  %_6.1 = extractvalue { i32, i1 } %1, 1 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           65:  store i32 %_6.0, ptr %iter, align 4 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           66:  %2 = call i1 @llvm.expect.i1(i1 %_6.1, i1 false) 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           67:  br i1 %2, label %bb5, label %bb7 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           68:  
check:27'0     ~
           69: bb7: ; preds = %bb3 
check:27'0     ~~~~~~~~~~~~~~~~~~~~
           70:  call void @maybe_has_side_effect() #5 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           71:  br label %bb1 
check:27'0     ~~~~~~~~~~~~~~~
           72:  
check:27'0     ~
           73: bb5: ; preds = %bb3 
check:27'0     ~~~~~~~~~~~~~~~~~~~~
           74:  unreachable 
check:27'0     ~~~~~~~~~~~~~
           75: } 
check:27'0     ~~
           76:  
check:27'0     ~
           77: ; Function Attrs: uwtable 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
           78: define void @unroll_never() unnamed_addr #1 { 
check:27'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
check:37'0                              X~~~~~~~~~~~~~~~~~~~~ error: no match found
           79: start: 
check:37'0     ~~~~~~~
           80:  %iter = alloca [4 x i8], align 4 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           81:  store i32 0, ptr %iter, align 4 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           82:  br label %bb1 
check:37'0     ~~~~~~~~~~~~~~~
           83:  
check:37'0     ~
           84: bb1: ; preds = %bb7, %start 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           85:  %_3 = load i32, ptr %iter, align 4, !noundef !4 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           86:  %_2 = icmp slt i32 %_3, 10 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           87:  br i1 %_2, label %bb3, label %bb4 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           88:  
check:37'0     ~
           89: bb4: ; preds = %bb1 
check:37'0     ~~~~~~~~~~~~~~~~~~~~
           90:  ret void 
check:37'0     ~~~~~~~~~~
           91:  
check:37'0     ~
           92: bb3: ; preds = %bb1 
check:37'0     ~~~~~~~~~~~~~~~~~~~~
           93:  %0 = load i32, ptr %iter, align 4, !noundef !4 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           94:  %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1) 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:37'1                            ?                                            possible intended match
           95:  %_6.0 = extractvalue { i32, i1 } %1, 0 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           96:  %_6.1 = extractvalue { i32, i1 } %1, 1 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           97:  store i32 %_6.0, ptr %iter, align 4 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           98:  %2 = call i1 @llvm.expect.i1(i1 %_6.1, i1 false) 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           99:  br i1 %2, label %bb5, label %bb7 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          100:  
check:37'0     ~
          101: bb7: ; preds = %bb3 
check:37'0     ~~~~~~~~~~~~~~~~~~~~
          102:  call void @maybe_has_side_effect() #5 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          103:  br label %bb1 
check:37'0     ~~~~~~~~~~~~~~~
          104:  
check:37'0     ~
          105: bb5: ; preds = %bb3 
check:37'0     ~~~~~~~~~~~~~~~~~~~~
          106:  unreachable 
check:37'0     ~~~~~~~~~~~~~
          107: } 
check:37'0     ~~
          108:  
check:37'0     ~
          109: ; Function Attrs: uwtable 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
          110: define void @unroll_count() unnamed_addr #1 { 
check:37'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
check:47'0                              X~~~~~~~~~~~~~~~~~~~~ error: no match found
          111: start: 
check:47'0     ~~~~~~~
          112:  %iter = alloca [4 x i8], align 4 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          113:  store i32 0, ptr %iter, align 4 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          114:  br label %bb1 
check:47'0     ~~~~~~~~~~~~~~~
          115:  
check:47'0     ~
          116: bb1: ; preds = %bb7, %start 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          117:  %_3 = load i32, ptr %iter, align 4, !noundef !4 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          118:  %_2 = icmp slt i32 %_3, 10 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          119:  br i1 %_2, label %bb3, label %bb4 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          120:  
check:47'0     ~
          121: bb4: ; preds = %bb1 
check:47'0     ~~~~~~~~~~~~~~~~~~~~
          122:  ret void 
check:47'0     ~~~~~~~~~~
          123:  
check:47'0     ~
          124: bb3: ; preds = %bb1 
check:47'0     ~~~~~~~~~~~~~~~~~~~~
          125:  %0 = load i32, ptr %iter, align 4, !noundef !4 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          126:  %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1) 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          127:  %_6.0 = extractvalue { i32, i1 } %1, 0 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          128:  %_6.1 = extractvalue { i32, i1 } %1, 1 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          129:  store i32 %_6.0, ptr %iter, align 4 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          130:  %2 = call i1 @llvm.expect.i1(i1 %_6.1, i1 false) 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          131:  br i1 %2, label %bb5, label %bb7 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          132:  
check:47'0     ~
          133: bb7: ; preds = %bb3 
check:47'0     ~~~~~~~~~~~~~~~~~~~~
          134:  call void @maybe_has_side_effect() #5 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          135:  br label %bb1 
check:47'0     ~~~~~~~~~~~~~~~
          136:  
check:47'0     ~
          137: bb5: ; preds = %bb3 
check:47'0     ~~~~~~~~~~~~~~~~~~~~
          138:  unreachable 
check:47'0     ~~~~~~~~~~~~~
          139: } 
check:47'0     ~~
          140:  
check:47'0     ~
          141: ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          142: declare { i32, i1 } @llvm.sadd.with.overflow.i32(i32, i32) #2 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          143:  
check:47'0     ~
          144: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none) 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          145: declare i1 @llvm.expect.i1(i1, i1) #3 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          146:  
check:47'0     ~
          147: ; Function Attrs: nounwind uwtable 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          148: declare void @maybe_has_side_effect() unnamed_addr #4 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          149:  
check:47'0     ~
          150: attributes #0 = { cold nounwind uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" } 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          151: attributes #1 = { uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" } 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          152: attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          153: attributes #3 = { nocallback nofree nosync nounwind willreturn memory(none) } 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          154: attributes #4 = { nounwind uwtable "frame-pointer"="non-leaf" "probe-stack"="inline-asm" "target-cpu"="generic" "target-features"="+v8a,+outline-atomics" } 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          155: attributes #5 = { nounwind } 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          156:  
check:47'0     ~
          157: !llvm.module.flags = !{!0, !1, !2} 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:47'1     ?                                   possible intended match
          158: !llvm.ident = !{!3} 
check:47'0     ~~~~~~~~~~~~~~~~~~~~
          159:  
check:47'0     ~
          160: !0 = !{i32 8, !"PIC Level", i32 2} 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          161: !1 = !{i32 7, !"uwtable", i32 2} 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          162: !2 = !{i32 7, !"frame-pointer", i32 1} 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          163: !3 = !{!"rustc version 1.100.0-nightly (9e9d92939 2026-08-16)"} 
check:47'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          164: !4 = !{} 
check:47'0     ~~~~~~~~~
>>>>>>

------------------------------------------

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-21/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll" "/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs:17:12: error: CHECK: expected string not found in input
 // CHECK: !llvm.loop ![[HINT:[0-9]+]]
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:14:25: note: scanning from here
define void @unroll_hint() unnamed_addr #1 {
                        ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:30:24: note: possible intended match here
 %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1)
                       ^
/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs:27:12: error: CHECK: expected string not found in input
 // CHECK: !llvm.loop ![[FULL:[0-9]+]]
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:46:25: note: scanning from here
define void @unroll_full() unnamed_addr #1 {
                        ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:62:24: note: possible intended match here
 %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1)
                       ^
/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs:37:12: error: CHECK: expected string not found in input
 // CHECK: !llvm.loop ![[DISABLE:[0-9]+]]
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:78:26: note: scanning from here
define void @unroll_never() unnamed_addr #1 {
                         ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:94:24: note: possible intended match here
 %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1)
                       ^
/checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs:47:12: error: CHECK: expected string not found in input
 // CHECK: !llvm.loop ![[COUNT:[0-9]+]]
           ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:110:26: note: scanning from here
define void @unroll_count() unnamed_addr #1 {
                         ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll:157:1: note: possible intended match here
!llvm.module.flags = !{!0, !1, !2}
^

Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/loop-attrs/unroll-for-metadata/unroll-for-metadata.ll
Check file: /checkout/tests/codegen-llvm/loop-attrs/unroll-for-metadata.rs

-dump-input=help explains the following input dump.

Input was:
<<<<<<
            1: ; ModuleID = 'unroll_for_metadata.bab16875355ff105-cgu.0' 
            2: source_filename = "unroll_for_metadata.bab16875355ff105-cgu.0" 
            3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128-Fn32" 
            4: target triple = "aarch64-unknown-linux-gnu" 
            5:  
            6: ; core::intrinsics::cold_path 
            7: ; Function Attrs: cold nounwind uwtable 
            8: define internal void @_RNvNtCs42Cx8Inlo83_4core10intrinsics9cold_path() unnamed_addr #0 { 
            9: start: 
           10:  ret void 
           11: } 
           12:  
           13: ; Function Attrs: uwtable 
           14: define void @unroll_hint() unnamed_addr #1 { 
check:17'0                             X~~~~~~~~~~~~~~~~~~~~ error: no match found
           15: start: 
check:17'0     ~~~~~~~
           16:  %iter = alloca [4 x i8], align 4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           17:  store i32 0, ptr %iter, align 4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           18:  br label %bb1 
check:17'0     ~~~~~~~~~~~~~~~
           19:  
check:17'0     ~
           20: bb1: ; preds = %bb7, %start 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           21:  %_3 = load i32, ptr %iter, align 4, !noundef !4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           22:  %_2 = icmp slt i32 %_3, 10 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           23:  br i1 %_2, label %bb3, label %bb4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           24:  
check:17'0     ~
           25: bb4: ; preds = %bb1 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           26:  ret void 
check:17'0     ~~~~~~~~~~
           27:  
check:17'0     ~
           28: bb3: ; preds = %bb1 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           29:  %0 = load i32, ptr %iter, align 4, !noundef !4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           30:  %1 = call { i32, i1 } @llvm.sadd.with.overflow.i32(i32 %0, i32 1) 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:17'1                            ?                                            possible intended match
           31:  %_6.0 = extractvalue { i32, i1 } %1, 0 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           32:  %_6.1 = extractvalue { i32, i1 } %1, 1 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           33:  store i32 %_6.0, ptr %iter, align 4 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           34:  %2 = call i1 @llvm.expect.i1(i1 %_6.1, i1 false) 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           35:  br i1 %2, label %bb5, label %bb7 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           36:  
check:17'0     ~
           37: bb7: ; preds = %bb3 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           38:  call void @maybe_has_side_effect() #5 
check:17'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           39:  br label %bb1 
check:17'0     ~~~~~~~~~~~~~~~
           40:  
check:17'0     ~
           41: bb5: ; preds = %bb3 
check:17'0     ~~~~~~~~~~~~~~~~~~~~
           42:  unreachable 
check:17'0     ~~~~~~~~~~~~~
           43: } 
check:17'0     ~~
           44:  
check:17'0     ~

@rust-bors

rust-bors Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 41edbdc (41edbdc645196961057567051d1be75e3afd971f)
Base parent: 67854e5 (67854e511de21d881bb16426996cd4259d44aa2e)

@rust-timer

This comment has been minimized.

@mejrs

mejrs commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

By the way the only attribute that (currently) has meaning here is the unroll attribute - consider benchmarking something like

pub struct Terminator<'tcx> {
    pub source_info: SourceInfo,
    pub kind: TerminatorKind<'tcx>,
-   pub attributes: ThinVec<AttributeKind>,
+   pub unroll: UnrollAttr,
}

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (41edbdc): comparison URL.

Overall result: ❌ regressions - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.6%, 0.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -3.8%, secondary 0.9%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-3.8% [-3.8%, -3.8%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.8% [-3.8%, -3.8%] 1

Cycles

Results (primary 3.5%, secondary -3.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.5% [3.5%, 3.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.1% [-3.2%, -2.9%] 2
All ❌✅ (primary) 3.5% [3.5%, 3.5%] 1

Binary size

Results (primary -0.2%, secondary -0.4%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.7%, -0.0%] 108
Improvements ✅
(secondary)
-0.4% [-1.3%, -0.0%] 77
All ❌✅ (primary) -0.2% [-0.7%, -0.0%] 108

Bootstrap: 459.382s -> 456.498s (-0.63%)
Artifact size: 396.87 MiB -> 396.44 MiB (-0.11%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 16, 2026
@panstromek

panstromek commented Aug 16, 2026

Copy link
Copy Markdown
Contributor Author

By the way the only attribute that (currently) has meaning here is the unroll attribute - consider benchmarking something like

pub struct Terminator<'tcx> {
   pub source_info: SourceInfo,
  pub kind: TerminatorKind<'tcx>,
-   pub attributes: ThinVec<AttributeKind>,
+   pub unroll: UnrollAttr,
}

That probably wouldn't help much, because Unroll has u32 argument, so it would have to get padded to 8 bytes as well.

Anyway, contraray to the original analysis, looks like this list is actually not the cause of the regression in #156816, or something significant changed in the meantime that changes it. I'll create a new issue and write down what I've found.

@panstromek panstromek closed this Aug 16, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants