forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#134864 - Zalathar:rollup-suc8ay9, r=Zalathar
Rollup of 3 pull requests Successful merges: - rust-lang#134849 (compiletest: Slightly simplify the handling of debugger directive prefixes) - rust-lang#134850 (Document virality of `feature(rustc_private)`) - rust-lang#134852 (Added a codegen test for optimization with const arrays) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
4 changed files
with
31 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//@ compile-flags: -O | ||
|
||
#![crate_type = "lib"] | ||
|
||
const LUT: [u8; 2] = [1, 1]; | ||
|
||
// CHECK-LABEL: @decode | ||
#[no_mangle] | ||
pub fn decode(i: u8) -> u8 { | ||
// CHECK: start: | ||
// CHECK-NEXT: icmp | ||
// CHECK-NEXT: select | ||
// CHECK-NEXT: ret | ||
if i < 2 { LUT[i as usize] } else { 2 } | ||
} |