Rename tests/codegen into tests/codegen-llvm
This commit is contained in:
15
tests/codegen-llvm/const-array.rs
Normal file
15
tests/codegen-llvm/const-array.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
//@ compile-flags: -Copt-level=3
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
const LUT: [u8; 4] = [1, 1, 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 < 4 { LUT[i as usize] } else { 2 }
|
||||
}
|
||||
Reference in New Issue
Block a user