1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
13 #![crate_type = "lib"]
15 // CHECK: define { i8, i8 } @pair_bool_bool(i1 zeroext %pair.0, i1 zeroext %pair.1)
17 pub fn pair_bool_bool(pair: (bool, bool)) -> (bool, bool) {
21 // CHECK: define { i8, i32 } @pair_bool_i32(i1 zeroext %pair.0, i32 %pair.1)
23 pub fn pair_bool_i32(pair: (bool, i32)) -> (bool, i32) {
27 // CHECK: define { i32, i8 } @pair_i32_bool(i32 %pair.0, i1 zeroext %pair.1)
29 pub fn pair_i32_bool(pair: (i32, bool)) -> (i32, bool) {
33 // CHECK: define { i8, i8 } @pair_and_or(i1 zeroext %arg0.0, i1 zeroext %arg0.1)
35 pub fn pair_and_or((a, b): (bool, bool)) -> (bool, bool) {
36 // Make sure it can operate directly on the unpacked args
37 // CHECK: and i1 %arg0.0, %arg0.1
38 // CHECK: or i1 %arg0.0, %arg0.1
42 // CHECK: define void @pair_branches(i1 zeroext %arg0.0, i1 zeroext %arg0.1)
44 pub fn pair_branches((a, b): (bool, bool)) {
45 // Make sure it can branch directly on the unpacked bool args
46 // CHECK: br i1 %arg0.0
50 // CHECK: br i1 %arg0.1