Skip to content
Closed
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
971427e
Fix #114608
g0djan Aug 8, 2023
591b547
Point out expectation even if we have RegionsInsufficientlyPolymorphic
compiler-errors Aug 9, 2023
55f8c66
Point at return type when it influences non-first `match` arm
estebank Aug 14, 2023
5021dde
Move scrutinee `HirId` into `MatchSource::TryDesugar`
estebank Aug 14, 2023
298ca67
review comment: add claryfing comment
estebank Aug 14, 2023
58aa903
bless clippy test
estebank Aug 14, 2023
c3889d1
Fix typos in unstable-book
xzmeng Aug 14, 2023
f8bda18
Fix typos in rustc doc platform netbsd
xzmeng Aug 14, 2023
1b6cf74
Fix typos in rustc doc platform aarch64-unknown-teeos
xzmeng Aug 14, 2023
29a1e46
Fix typos in rustc doc codegen-options
xzmeng Aug 14, 2023
aa6c02d
Fix typos in rustc doc platform loongarch-linux
xzmeng Aug 14, 2023
fe6d541
Fix typos in rustc doc platform x86_64h-apple-darwin
xzmeng Aug 14, 2023
1f42be6
Deny FnDef in patterns
compiler-errors Aug 15, 2023
fb07077
add missing feature(error_in_core)
RalfJung Aug 15, 2023
a826cdb
Migrate GUI colors test to original CSS color format
GuillaumeGomez Aug 15, 2023
7b69439
add codegen test for issue 107554
khei4 Aug 15, 2023
a741a5a
Document Default for ExitStatus
ijackson Aug 7, 2023
4728d90
Rollup merge of #114588 - ijackson:exit-status-default-2, r=m-ou-se
matthiaskrgr Aug 15, 2023
825115f
Rollup merge of #114619 - g0djan:godjan/fix_#114608, r=m-ou-se
matthiaskrgr Aug 15, 2023
072e134
Rollup merge of #114644 - compiler-errors:lt-err, r=wesleywiser
matthiaskrgr Aug 15, 2023
2d64446
Rollup merge of #114668 - compiler-errors:match-fn-def, r=petrochenkov
matthiaskrgr Aug 15, 2023
8cf9bd0
Rollup merge of #114819 - estebank:issue-78124, r=compiler-errors
matthiaskrgr Aug 15, 2023
a5bbf90
Rollup merge of #114826 - xzmeng:fix-typos, r=JohnTitor
matthiaskrgr Aug 15, 2023
6006f62
Rollup merge of #114837 - RalfJung:error_in_core, r=cuviper
matthiaskrgr Aug 15, 2023
b06df00
Rollup merge of #114850 - khei4:khei4/trailing_zero_codegen, r=nikic
matthiaskrgr Aug 15, 2023
e6709ad
Rollup merge of #114853 - GuillaumeGomez:migrate-gui-test-color-33, r…
matthiaskrgr Aug 15, 2023
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
22 changes: 22 additions & 0 deletions tests/codegen/trailing_zeros.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// compile-flags: -O
// min-llvm-version: 17

#![crate_type = "lib"]

// CHECK-LABEL: @trailing_zeros_ge
#[no_mangle]
pub fn trailing_zeros_ge(val: u32) -> bool {
// CHECK: %[[AND:.*]] = and i32 %val, 7
// CHECK: %[[ICMP:.*]] = icmp eq i32 [[AND]], 0
// CHECK: ret i1 [[ICMP]]
val.trailing_zeros() >= 3
}

// CHECK-LABEL: @trailing_zeros_gt
#[no_mangle]
pub fn trailing_zeros_gt(val: u64) -> bool {
// CHECK: %[[AND:.*]] = and i64 %val, 15
// CHECK: %[[ICMP:.*]] = icmp eq i64 [[AND]], 0
// CHECK: ret i1 [[ICMP]]
val.trailing_zeros() > 3
}