Skip to content

Commit c37ec99

Browse files
committed
Fortify codegen test.
1 parent 0d57e46 commit c37ec99

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

tests/codegen/inline-hint.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Checks that closures, constructors, and shims except
22
// for a drop glue receive inline hint by default.
33
//
4-
// compile-flags: -Cno-prepopulate-passes -Csymbol-mangling-version=v0 -Zinline-mir=no
4+
// compile-flags: -Cno-prepopulate-passes -Csymbol-mangling-version=v0 -Zmir-opt-level=0
55
#![crate_type = "lib"]
66

77
pub fn f() {

tests/codegen/simd/simd-wide-sum.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ pub fn wider_reduce_iter(x: Simd<u8, N>) -> u16 {
5252
#[no_mangle]
5353
// CHECK-LABEL: @wider_reduce_into_iter
5454
pub fn wider_reduce_into_iter(x: Simd<u8, N>) -> u16 {
55-
// FIXME: It would be nice if this was exactly the same as the above tests,
56-
// but at the time of writing this comment, that didn't happen on LLVM main.
57-
// CHECK: call i16 @llvm.vector.reduce.add
55+
// CHECK: zext <16 x i8>
56+
// CHECK-SAME: to <16 x i16>
57+
// CHECK: call i16 @llvm.vector.reduce.add.v16i16(<16 x i16>
5858
x.to_array().into_iter().map(u16::from).sum()
5959
}

tests/codegen/swap-large-types.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ type KeccakBuffer = [[u64; 5]; 5];
1616
// CHECK-LABEL: @swap_basic
1717
#[no_mangle]
1818
pub fn swap_basic(x: &mut KeccakBuffer, y: &mut KeccakBuffer) {
19-
// CHECK: alloca [5 x [5 x i64]]
19+
// CHECK-NOT: alloca [5 x [5 x i64]]
20+
// CHECK: tail call void @llvm.memcpy
21+
// CHECK-NOT: tail call void @llvm.memcpy
2022

2123
// SAFETY: exclusive references are always valid to read/write,
2224
// are non-overlapping, and nothing here panics so it's drop-safe.

0 commit comments

Comments
 (0)