Fix tests for 32 bits targets
This commit is contained in:
parent
f9edd864df
commit
ab0f87ec66
@ -1,27 +1,26 @@
|
|||||||
//@ assembly-output: emit-asm
|
//@ assembly-output: emit-asm
|
||||||
//@ compile-flags:-Copt-level=3
|
//@ compile-flags: -Copt-level=3
|
||||||
//@ only-x86_64
|
//@ only-x86_64
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
type T = u8;
|
type T = u8;
|
||||||
type T1 = (T, T, T, T, T, T, T, T);
|
type T1 = (T, T, T, T, T, T, T, T);
|
||||||
type T2 = [T; 8];
|
|
||||||
|
|
||||||
// CHECK-LABEL: foo1a
|
// CHECK-LABEL: foo1a
|
||||||
// CHECK: cmp
|
// CHECK: cmpq
|
||||||
// CHECK-NEXT: sete
|
// CHECK-NEXT: sete
|
||||||
// CHECK-NEXT: ret
|
// CHECK-NEXT: {{retq|popq}}
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn foo1a(a: T1, b: T1) -> bool {
|
pub fn foo1a(a: T1, b: T1) -> bool {
|
||||||
a == b
|
a == b
|
||||||
}
|
}
|
||||||
|
|
||||||
// CHECK-LABEL: foo1b
|
// CHECK-LABEL: foo1b
|
||||||
// CHECK: mov
|
// CHECK: movq
|
||||||
// CHECK-NEXT: cmp
|
// CHECK: cmpq
|
||||||
// CHECK-NEXT: sete
|
// CHECK-NEXT: sete
|
||||||
// CHECK-NEXT: ret
|
// CHECK-NEXT: {{retq|popq}}
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn foo1b(a: &T1, b: &T1) -> bool {
|
pub fn foo1b(a: &T1, b: &T1) -> bool {
|
||||||
a == b
|
a == b
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
// CHECK-LABEL: @foo
|
// CHECK-LABEL: @foo
|
||||||
// CHECK-NEXT: {{.*}}:
|
// CHECK-NEXT: {{.*}}:
|
||||||
// CHECK-NEXT: getelementptr inbounds
|
// CHECK-NEXT: getelementptr inbounds
|
||||||
// CHECK-NEXT: load i64
|
// CHECK-NEXT: load [[TYPE:i(32|64)]]
|
||||||
// CHECK-NEXT: icmp eq i64
|
// CHECK-NEXT: icmp eq [[TYPE]]
|
||||||
// CHECK-NEXT: br i1
|
// CHECK-NEXT: br i1
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn foo(input: &mut &[u64]) -> Option<u64> {
|
pub fn foo(input: &mut &[u64]) -> Option<u64> {
|
||||||
|
@ -13,8 +13,8 @@ pub enum K {
|
|||||||
// CHECK-LABEL: @get_len
|
// CHECK-LABEL: @get_len
|
||||||
// CHECK-NEXT: {{.*}}:
|
// CHECK-NEXT: {{.*}}:
|
||||||
// CHECK-NEXT: getelementptr inbounds
|
// CHECK-NEXT: getelementptr inbounds
|
||||||
// CHECK-NEXT: load
|
// CHECK-NEXT: load [[TYPE:i(32|64)]]
|
||||||
// CHECK-NEXT: ret i64
|
// CHECK-NEXT: ret [[TYPE]]
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn get_len(arg: &K) -> usize {
|
pub fn get_len(arg: &K) -> usize {
|
||||||
match arg {
|
match arg {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
// CHECK-LABEL: @slice_ptr_len_1
|
// CHECK-LABEL: @slice_ptr_len_1
|
||||||
// CHECK-NEXT: {{.*}}:
|
// CHECK-NEXT: {{.*}}:
|
||||||
// CHECK-NEXT: ret i64 %ptr.1
|
// CHECK-NEXT: ret {{i(32|64)}} %ptr.1
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub fn slice_ptr_len_1(ptr: *const [u8]) -> usize {
|
pub fn slice_ptr_len_1(ptr: *const [u8]) -> usize {
|
||||||
let ptr = ptr.cast_mut();
|
let ptr = ptr.cast_mut();
|
||||||
|
Loading…
Reference in New Issue
Block a user