-
Notifications
You must be signed in to change notification settings - Fork 13.8k
tests: relax expectations after llvm change 902ddda120a5 #146732
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
Conversation
This comment has been minimized.
This comment has been minimized.
@rustbot label +S-waiting-on-author -S-waiting-on-review Well that's annoying, I'll have to figure out how to make it pass on LLVM 21 as well as 22. |
LLVM 22 is able to drop assumes that seem to not help further optimizations, which actually seems to dramatically _help_ further optimizations in some of our small test cases.
8f97242
to
e32b975
Compare
Updated, all three tests should now pass on LLVM 22+ and LLVM < 22. I decided to just accept the two disappeared instructions in |
@rustbot label -S-waiting-on-author +S-waiting-on-review |
llvm/llvm-project#159403 adds a pass which causes the tests in question to fail because it removes several calls to `llvm.assume(...)`. The fix at rust-lang/rust#146732 effectively neuters the test, so we may as well temporarily disable it on our side. Bug: 446928953 Change-Id: Iade597d144e68bf384076673b75f2f3f616de5b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6977874 Auto-Submit: Alan Zhao <[email protected]> Reviewed-by: Hans Wennborg <[email protected]> Commit-Queue: Hans Wennborg <[email protected]> Cr-Commit-Position: refs/heads/main@{#1519796}
tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs
Outdated
Show resolved
Hide resolved
@bors r+ rollup |
tests: relax expectations after llvm change 902ddda120a5 LLVM 22 is able to drop assumes that seem to not help further optimizations, which actually seems to dramatically _help_ further optimizations in some of our small test cases. I'm a little unclear how to fix the last failure, in `tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs`: ``` -; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: write) uwtable +; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite, inaccessiblemem: write) uwtable define void `@update(ptr` noundef captures(none) %s) unnamed_addr #0 { start: - %_3.sroa.0.0.copyload = load i8, ptr %s, align 1 - %0 = trunc nuw i8 %_3.sroa.0.0.copyload to i1 - %1 = xor i1 %0, true - tail call void `@llvm.assume(i1` %1) store i8 1, ptr %s, align 1 ret void } ``` I'm just not conversant enough in LLVM IR to follow the changes here. `@rustbot` label llvm-main r? nikic
Rollup of 9 pull requests Successful merges: - #140482 (std::net: update tcp deferaccept delay type to Duration.) - #146037 (Introduce CoerceShared lang item and trait, and basic Reborrow tests) - #146732 (tests: relax expectations after llvm change 902ddda120a5) - #147018 (re-order normalizations in run-make linker-warning test) - #147032 (Fix doctest compilation time display) - #147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) - #147050 (PassWrapper: update for new PGOOptions args in LLVM 22) - #147075 (Make `def_path_hash_to_def_id` not panic when passed an invalid hash) - #147076 (update issue number for more_float_constants) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - #146037 (Introduce CoerceShared lang item and trait, and basic Reborrow tests) - #146732 (tests: relax expectations after llvm change 902ddda120a5) - #147018 (re-order normalizations in run-make linker-warning test) - #147032 (Fix doctest compilation time display) - #147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) - #147050 (PassWrapper: update for new PGOOptions args in LLVM 22) - #147075 (Make `def_path_hash_to_def_id` not panic when passed an invalid hash) - #147076 (update issue number for more_float_constants) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146732 - durin42:llvm-22-less-assumes, r=nikic tests: relax expectations after llvm change 902ddda120a5 LLVM 22 is able to drop assumes that seem to not help further optimizations, which actually seems to dramatically _help_ further optimizations in some of our small test cases. I'm a little unclear how to fix the last failure, in `tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs`: ``` -; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: write) uwtable +; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(argmem: readwrite, inaccessiblemem: write) uwtable define void ``@update(ptr`` noundef captures(none) %s) unnamed_addr #0 { start: - %_3.sroa.0.0.copyload = load i8, ptr %s, align 1 - %0 = trunc nuw i8 %_3.sroa.0.0.copyload to i1 - %1 = xor i1 %0, true - tail call void ``@llvm.assume(i1`` %1) store i8 1, ptr %s, align 1 ret void } ``` I'm just not conversant enough in LLVM IR to follow the changes here. ``@rustbot`` label llvm-main r? nikic
LLVM 22 is able to drop assumes that seem to not help further optimizations, which actually seems to dramatically help further optimizations in some of our small test cases.
I'm a little unclear how to fix the last failure, in
tests/codegen-llvm/issues/issue-122600-ptr-discriminant-update.rs
:I'm just not conversant enough in LLVM IR to follow the changes here.
@rustbot label llvm-main
r? nikic