Skip to content

remove "Known problems" of verbose_bit_mask #14137

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

Merged
merged 1 commit into from
Feb 2, 2025

Conversation

lapla-cogito
Copy link
Contributor

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Feb 2, 2025

r? @llogiq

rustbot has assigned @llogiq.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 2, 2025
@lapla-cogito
Copy link
Contributor Author

lapla-cogito commented Feb 2, 2025

I checked this on my x86 machine with the following:

#[no_mangle]
pub fn f(x: i32) -> bool {
    x.trailing_zeros() >= 4 // or `x & 15 == 0`
}

fn main(){}

and compared the output of rustc --emit asm src/main.rs -O. As a result, either way of implementation didn't change the assembly output for f:

f:
	.cfi_startproc
	testb	$15, %dil
	sete	%al
	retq

@llogiq
Copy link
Contributor

llogiq commented Feb 2, 2025

Cool! Thank you for checking this out.

@llogiq llogiq added this pull request to the merge queue Feb 2, 2025
Merged via the queue into rust-lang:master with commit 0d3fd98 Feb 2, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants