Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace SingleUseConsts by GVN. #147079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
cjgillot wants to merge 4 commits into rust-lang:master
base: master
Choose a base branch
Loading
from cjgillot:gvn-dbg-const

Conversation

Copy link
Contributor

@cjgillot cjgillot commented Sep 26, 2025

r? @ghost

@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 Sep 26, 2025
Copy link
Contributor Author

@bors try @rust-timer queue

This comment has been minimized.

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Sep 26, 2025
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 26, 2025
Copy link
Collaborator

The job aarch64-gnu-llvm-20-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/amdgpu-addrspacecast.rs stdout ----
------FileCheck stdout------------------------------
------FileCheck stderr------------------------------
/checkout/tests/codegen-llvm/amdgpu-addrspacecast.rs:13:11: error: CHECK: expected string not found in input
// CHECK: %i = addrspacecast ptr addrspace(5) [[alloca]] to ptr
 ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll:11:13: note: scanning from here
 %0 = alloca [4 x i8], align 4, addrspace(5)
 ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll:11:13: note: with "alloca" equal to "%0"
 %0 = alloca [4 x i8], align 4, addrspace(5)
 ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll:12:3: note: possible intended match here
 %_2 = addrspacecast ptr addrspace(5) %0 to ptr
 ^
Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll
Check file: /checkout/tests/codegen-llvm/amdgpu-addrspacecast.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
 1: ; ModuleID = 'amdgpu_addrspacecast.8718c542dfbe9a16-cgu.0' 
 2: source_filename = "amdgpu_addrspacecast.8718c542dfbe9a16-cgu.0" 
 3: target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9" 
 4: target triple = "amdgcn-amd-amdhsa" 
 5: 
 6: @I = addrspace(1) constant [4 x i8] zeroinitializer, align 4 
 7: 
 8: ; Function Attrs: nounwind uwtable 
 9: define void @ref_of_local(ptr nocapture noundef nonnull readonly %f) unnamed_addr #0 { 
 10: start: 
 11: %0 = alloca [4 x i8], align 4, addrspace(5) 
check:13'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:13'1 with "alloca" equal to "%0"
 12: %_2 = addrspacecast ptr addrspace(5) %0 to ptr 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:13'2 ? possible intended match
 13: call void @llvm.lifetime.start.p0(i64 4, ptr %_2) 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 14: store i32 0, ptr addrspace(5) %0, align 4 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 15: call void %f(ptr noalias noundef nonnull readonly align 4 dereferenceable(4) %_2) #2 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 16: call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %_2) 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 17: ret void 
check:13'0 ~~~~~~~~~~
 18: } 
check:13'0 ~~
 19: 
check:13'0 ~
 20: ; Function Attrs: nounwind uwtable 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21: define void @ref_of_global(ptr nocapture noundef nonnull readonly %f) unnamed_addr #0 { 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 22: start: 
 23: tail call void %f(ptr noalias noundef readonly align 4 dereferenceable(4) addrspacecast (ptr addrspace(1) @I to ptr)) #2 
 24: ret void 
 25: } 
 26: 
 27: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
 28: declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 
 29: 
 30: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
 31: declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 
 32: 
 33: attributes #0 = { nounwind uwtable "target-cpu"="gfx900" } 
 34: attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 
 35: attributes #2 = { nounwind } 
 36: 
 37: !llvm.module.flags = !{!0} 
 38: !llvm.ident = !{!1} 
 39: 
 40: !0 = !{i32 8, !"PIC Level", i32 2} 
 41: !1 = !{!"rustc version 1.92.0-nightly (ff28410a3 2025年09月26日)"} 
>>>>>>
------------------------------------------
error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-20/bin/FileCheck" "--input-file" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll" "/checkout/tests/codegen-llvm/amdgpu-addrspacecast.rs" "--check-prefix=CHECK" "--allow-unused-prefixes" "--dump-input-context" "100"
stdout: none
--- stderr -------------------------------
/checkout/tests/codegen-llvm/amdgpu-addrspacecast.rs:13:11: error: CHECK: expected string not found in input
// CHECK: %i = addrspacecast ptr addrspace(5) [[alloca]] to ptr
 ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll:11:13: note: scanning from here
 %0 = alloca [4 x i8], align 4, addrspace(5)
 ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll:11:13: note: with "alloca" equal to "%0"
 %0 = alloca [4 x i8], align 4, addrspace(5)
 ^
/checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll:12:3: note: possible intended match here
 %_2 = addrspacecast ptr addrspace(5) %0 to ptr
 ^
Input file: /checkout/obj/build/aarch64-unknown-linux-gnu/test/codegen-llvm/amdgpu-addrspacecast/amdgpu-addrspacecast.ll
Check file: /checkout/tests/codegen-llvm/amdgpu-addrspacecast.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
 1: ; ModuleID = 'amdgpu_addrspacecast.8718c542dfbe9a16-cgu.0' 
 2: source_filename = "amdgpu_addrspacecast.8718c542dfbe9a16-cgu.0" 
 3: target datalayout = "e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9" 
 4: target triple = "amdgcn-amd-amdhsa" 
 5: 
 6: @I = addrspace(1) constant [4 x i8] zeroinitializer, align 4 
 7: 
 8: ; Function Attrs: nounwind uwtable 
 9: define void @ref_of_local(ptr nocapture noundef nonnull readonly %f) unnamed_addr #0 { 
 10: start: 
 11: %0 = alloca [4 x i8], align 4, addrspace(5) 
check:13'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
check:13'1 with "alloca" equal to "%0"
 12: %_2 = addrspacecast ptr addrspace(5) %0 to ptr 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:13'2 ? possible intended match
 13: call void @llvm.lifetime.start.p0(i64 4, ptr %_2) 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 14: store i32 0, ptr addrspace(5) %0, align 4 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 15: call void %f(ptr noalias noundef nonnull readonly align 4 dereferenceable(4) %_2) #2 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 16: call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %_2) 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 17: ret void 
check:13'0 ~~~~~~~~~~
 18: } 
check:13'0 ~~
 19: 
check:13'0 ~
 20: ; Function Attrs: nounwind uwtable 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 21: define void @ref_of_global(ptr nocapture noundef nonnull readonly %f) unnamed_addr #0 { 
check:13'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 22: start: 
 23: tail call void %f(ptr noalias noundef readonly align 4 dereferenceable(4) addrspacecast (ptr addrspace(1) @I to ptr)) #2 
 24: ret void 
 25: } 
 26: 
 27: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
 28: declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 
 29: 
 30: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) 
 31: declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 
 32: 
 33: attributes #0 = { nounwind uwtable "target-cpu"="gfx900" } 
 34: attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 
 35: attributes #2 = { nounwind } 
 36: 
 37: !llvm.module.flags = !{!0} 
 38: !llvm.ident = !{!1} 
 39: 
 40: !0 = !{i32 8, !"PIC Level", i32 2} 
 41: !1 = !{!"rustc version 1.92.0-nightly (ff28410a3 2025年09月26日)"} 
>>>>>>
------------------------------------------
---- [codegen] tests/codegen-llvm/amdgpu-addrspacecast.rs stdout end ----

Copy link

rust-bors bot commented Sep 26, 2025

☀️ Try build successful (CI)
Build commit: 70aac37 (70aac379929263ba1dd1d7cb6838e7e6b58c5d2b, parent: 54a8a1db604e4caff93e26e167ad4a6fde9f0681)

This comment has been minimized.

Copy link
Collaborator

Finished benchmarking commit (70aac37): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.

@bors rollup=never
@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.7% [0.1%, 2.9%] 18
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 2
Improvements ✅
(primary)
-0.3% [-0.6%, -0.2%] 15
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 4
All ❌✅ (primary) 0.3% [-0.6%, 2.9%] 33

Max RSS (memory usage)

Results (primary -0.9%, secondary 4.1%)

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

mean range count
Regressions ❌
(primary)
1.9% [1.0%, 2.9%] 5
Regressions ❌
(secondary)
4.1% [0.7%, 5.0%] 8
Improvements ✅
(primary)
-3.3% [-5.4%, -1.0%] 6
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.9% [-5.4%, 2.9%] 11

Cycles

Results (primary -1.9%, secondary -5.2%)

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

mean range count
Regressions ❌
(primary)
2.9% [2.9%, 2.9%] 1
Regressions ❌
(secondary)
2.2% [2.0%, 2.4%] 2
Improvements ✅
(primary)
-3.5% [-3.8%, -3.2%] 3
Improvements ✅
(secondary)
-6.2% [-10.6%, -2.4%] 15
All ❌✅ (primary) -1.9% [-3.8%, 2.9%] 4

Binary size

Results (primary -0.1%, secondary -0.0%)

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

mean range count
Regressions ❌
(primary)
0.2% [0.0%, 1.5%] 38
Regressions ❌
(secondary)
0.1% [0.0%, 0.6%] 28
Improvements ✅
(primary)
-0.3% [-0.7%, -0.0%] 70
Improvements ✅
(secondary)
-0.2% [-0.7%, -0.0%] 27
All ❌✅ (primary) -0.1% [-0.7%, 1.5%] 108

Bootstrap: 471.437s -> 470.824s (-0.13%)
Artifact size: 388.14 MiB -> 388.43 MiB (0.08%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
perf-regression Performance regression. 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.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /