Skip to content

Commit

Permalink
change test to check for bcmp
Browse files Browse the repository at this point in the history
  • Loading branch information
erikdesjardins committed Dec 23, 2020
1 parent c7daf18 commit f29b6b8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
16 changes: 16 additions & 0 deletions src/test/codegen/slice-ref-equality.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// compile-flags: -C opt-level=3

#![crate_type = "lib"]

// #71602: check that slice equality just generates a single bcmp

// CHECK-LABEL: @is_zero_slice
#[no_mangle]
pub fn is_zero_slice(data: &[u8; 4]) -> bool {
// CHECK: start:
// CHECK-NEXT: %{{.+}} = getelementptr {{.+}}
// CHECK-NEXT: %[[BCMP:.+]] = tail call i32 @bcmp({{.+}})
// CHECK-NEXT: %[[EQ:.+]] = icmp eq i32 %[[BCMP]], 0
// CHECK-NEXT: ret i1 %[[EQ]]
*data == [0; 4]
}
12 changes: 0 additions & 12 deletions src/test/codegen/slice-ref-ptr-check.rs

This file was deleted.

0 comments on commit f29b6b8

Please sign in to comment.