Skip to content
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

Rollup of 16 pull requests #138548

Merged
merged 47 commits into from
Mar 16, 2025
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
57046e1
doc: clarify that consume can be called after BufReader::peek
lolbinarycat Mar 2, 2025
69ef2fc
fix: properly escape regexes
dingxiangfei2009 Mar 3, 2025
638b226
Remove #[cfg(not(test))] gates in core
thaliaarchi Mar 6, 2025
769425a
Expand `CloneToUninit` documentation.
kpreid Nov 14, 2024
a312635
expose `is_s390x_feature_detected` from `std::arch`
folkertdev Mar 9, 2025
55c658b
fix ptr inconsistency in Rc Arc
DiuDiu777 Mar 10, 2025
fa183ad
fix copy typo
DiuDiu777 Mar 10, 2025
48a54d0
add missing doc for intrinsic
DiuDiu777 Mar 10, 2025
2cc999d
Rewrite comments about dropping and leaking.
kpreid Mar 10, 2025
96814ae
Rewrite example to not deal with `Copy` at all.
kpreid Mar 10, 2025
58d4395
Expand and organize `offset_of!` documentation.
kpreid Mar 10, 2025
8f32547
Move `offset_of_enum` documentation to unstable book; add `offset_of_…
kpreid Mar 11, 2025
3c74d02
debug-assert that the size_hint is well-formed in `collect`
scottmcm Mar 11, 2025
d2ff658
Update library/core/src/intrinsics/mod.rs
DiuDiu777 Mar 13, 2025
6a01990
Update library/core/src/intrinsics/mod.rs
DiuDiu777 Mar 13, 2025
2f824ea
Update library/core/src/intrinsics/mod.rs
DiuDiu777 Mar 13, 2025
ad74285
add exclude to config.toml
Shourya742 Feb 16, 2025
7d1537e
add test for exclude feature
Shourya742 Feb 16, 2025
22571da
Add change info to change tracker
Shourya742 Feb 16, 2025
9d5f074
make test platform agnostic
Shourya742 Mar 4, 2025
c6ecd8c
update the test_exclude to not use paths with path separators
Shourya742 Mar 9, 2025
b9e00b3
bump html5ever to 0.28
klensy Mar 13, 2025
7b4b4b1
bump html5ever to 0.29 with deps
klensy Mar 13, 2025
82a79b9
Add codegen test for modulo with power-of-two divisor
KonaeAkira Mar 14, 2025
ccde0a2
Fix formatting (line too long)
KonaeAkira Mar 14, 2025
bc6047a
Use lit span when suggesting suffix lit cast
xizheyin Mar 14, 2025
9f06585
improves outer mod attribute test
spencer3035 Mar 13, 2025
6207559
improves duplicate label test
spencer3035 Mar 14, 2025
27077b9
improves duplicate lang item test
spencer3035 Mar 13, 2025
13134dd
Don't drop Rvalue::WrapUnsafeBinder during GVN
compiler-errors Mar 11, 2025
e3ac1fa
Add RTN support to rustdoc
compiler-errors Mar 3, 2025
4946818
Rollup merge of #133055 - kpreid:clone-uninit-doc, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
b8c51f4
Rollup merge of #137147 - Shourya742:2025-02-16-support-exclude-in-co…
jieyouxu Mar 16, 2025
903b526
Rollup merge of #137864 - compiler-errors:unsafe-binder-gvn, r=oli-obk
jieyouxu Mar 16, 2025
f16ce2a
Rollup merge of #137890 - lolbinarycat:docs-bufreader-peek-consume, r…
jieyouxu Mar 16, 2025
8882dac
Rollup merge of #137956 - compiler-errors:rtn-rustdoc, r=fmease
jieyouxu Mar 16, 2025
199e714
Rollup merge of #137968 - dingxiangfei2009:patch-1, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
e084680
Rollup merge of #138082 - thaliaarchi:slice-cfg-not-test, r=thomcc
jieyouxu Mar 16, 2025
8210b84
Rollup merge of #138275 - folkertdev:expose-is-s390x-feature-detected…
jieyouxu Mar 16, 2025
7112951
Rollup merge of #138303 - DiuDiu777:rc-fix, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
413600c
Rollup merge of #138309 - DiuDiu777:intrinsic-doc-fix, r=thomcc
jieyouxu Mar 16, 2025
5b92250
Rollup merge of #138323 - kpreid:offset-of-doc, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
01bc954
Rollup merge of #138329 - scottmcm:assert-hint, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
e42f339
Rollup merge of #138465 - klensy:linkchecker-b, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
7c1555c
Rollup merge of #138471 - spencer3035:move-ui-test-1ofn, r=jieyouxu
jieyouxu Mar 16, 2025
c05a643
Rollup merge of #138472 - KonaeAkira:master, r=Mark-Simulacrum
jieyouxu Mar 16, 2025
f4372f5
Rollup merge of #138484 - xizheyin:issue-138392, r=compiler-errors
jieyouxu Mar 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add codegen test for modulo with power-of-two divisor
KonaeAkira committed Mar 14, 2025
commit 82a79b99e1279ad72cb93c2ad10c6be1facaca4a
16 changes: 16 additions & 0 deletions tests/codegen/issues/issue-129795.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//@ compile-flags: -Copt-level=3
//@ min-llvm-version: 20
#![crate_type = "lib"]

// Ensure that a modulo operation with an operand that is known to be a power-of-two is properly optimized.

Check failure on line 5 in tests/codegen/issues/issue-129795.rs

GitHub Actions / PR - mingw-check-tidy

line longer than 100 chars

// CHECK-LABEL: @modulo_with_power_of_two_divisor
// CHECK: add i64 %divisor, -1
// CHECK-NEXT: and i64
// CHECK-NEXT: ret i64
#[no_mangle]
pub fn modulo_with_power_of_two_divisor(dividend: u64, divisor: u64) -> u64 {
assert!(divisor.is_power_of_two());
// should be optimized to (dividend & (divisor - 1))
dividend % divisor
}
Loading