Skip to content

Commit

Permalink
make it into an IR test
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed May 20, 2024
1 parent 4b7466c commit 422de35
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tests/assembly/62531-array-cmp.rs → tests/codegen/array-cmp.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
// Ensure the asm for array comparisons is properly optimized on x86.
// Ensure the asm for array comparisons is properly optimized.

//@ min-llvm-version: 12
//@ assembly-output: emit-asm
//@ compile-flags: -C opt-level=2
//@ only-x86_64

#![crate_type = "lib"]

// CHECK-LABEL: compare
// CHECK: movb $1, %al
// CHECK-NEXT: retq
// CHECK-LABEL: @compare
// CHECK-NEXT: ret i1 true
#[no_mangle]
pub fn compare() -> bool {
let bytes = 12.5f32.to_ne_bytes();
Expand Down

0 comments on commit 422de35

Please sign in to comment.