Skip to content

Commit

Permalink
Fix tests for 32 bits targets
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jun 11, 2024
1 parent f9edd86 commit e6a2c7c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions tests/assembly/issue-83585-small-pod-struct-equality.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ assembly-output: emit-asm
//@ compile-flags:-Copt-level=3
//@ compile-flags: -Copt-level=3
//@ only-x86_64

#![crate_type = "lib"]
Expand All @@ -9,19 +9,19 @@ type T1 = (T, T, T, T, T, T, T, T);
type T2 = [T; 8];

// CHECK-LABEL: foo1a
// CHECK: cmp
// CHECK: cmpq
// CHECK-NEXT: sete
// CHECK-NEXT: ret
// CHECK-NEXT: retq
#[no_mangle]
pub fn foo1a(a: T1, b: T1) -> bool {
a == b
}

// CHECK-LABEL: foo1b
// CHECK: mov
// CHECK-NEXT: cmp
// CHECK: movq
// CHECK: cmpq
// CHECK-NEXT: sete
// CHECK-NEXT: ret
// CHECK-NEXT: retq
#[no_mangle]
pub fn foo1b(a: &T1, b: &T1) -> bool {
a == b
Expand Down
4 changes: 2 additions & 2 deletions tests/codegen/issues/issue-109328-split_first.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// CHECK-LABEL: @foo
// CHECK-NEXT: {{.*}}:
// CHECK-NEXT: getelementptr inbounds
// CHECK-NEXT: load i64
// CHECK-NEXT: icmp eq i64
// CHECK-NEXT: load [[TYPE:i(32|64)]]
// CHECK-NEXT: icmp eq [[TYPE]]
// CHECK-NEXT: br i1
#[no_mangle]
pub fn foo(input: &mut &[u64]) -> Option<u64> {
Expand Down
4 changes: 2 additions & 2 deletions tests/codegen/issues/issue-110797-enum-jump-same.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ pub enum K {
// CHECK-LABEL: @get_len
// CHECK-NEXT: {{.*}}:
// CHECK-NEXT: getelementptr inbounds
// CHECK-NEXT: load
// CHECK-NEXT: ret i64
// CHECK-NEXT: load [[TYPE:i(32|64)]]
// CHECK-NEXT: ret [[TYPE]]
#[no_mangle]
pub fn get_len(arg: &K) -> usize {
match arg {
Expand Down
2 changes: 1 addition & 1 deletion tests/codegen/slice-pointer-nonnull-unwrap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::ptr::NonNull;

// CHECK-LABEL: @slice_ptr_len_1
// CHECK-NEXT: {{.*}}:
// CHECK-NEXT: ret i64 %ptr.1
// CHECK-NEXT: ret {{i(32|64)}} %ptr.1
#[no_mangle]
pub fn slice_ptr_len_1(ptr: *const [u8]) -> usize {
let ptr = ptr.cast_mut();
Expand Down

0 comments on commit e6a2c7c

Please sign in to comment.