summaryrefslogtreecommitdiffstats
path: root/tests/codegen/no-assumes-on-casts.rs
blob: b5cfa2775abb7417fca504c14610dfcfbb655f8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![crate_type = "lib"]

// compile-flags: -Cno-prepopulate-passes

// CHECK-LABEL: fna
#[no_mangle]
pub fn fna(a: i16) -> i32 {
    a as i32
// CHECK-NOT: assume
// CHECK: sext
}

// CHECK-LABEL: fnb
#[no_mangle]
pub fn fnb(a: u16) -> u32 {
    a as u32
// CHECK-NOT: assume
// CHECK: zext
}