summaryrefslogtreecommitdiffstats
path: root/src/test/codegen/no-assumes-on-casts.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/codegen/no-assumes-on-casts.rs')
-rw-r--r--src/test/codegen/no-assumes-on-casts.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/codegen/no-assumes-on-casts.rs b/src/test/codegen/no-assumes-on-casts.rs
new file mode 100644
index 000000000..b5cfa2775
--- /dev/null
+++ b/src/test/codegen/no-assumes-on-casts.rs
@@ -0,0 +1,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
+}