Skip to content

Commit 5901a2d

Browse files
committed
Use a fixed chunk size in codegen test
1 parent b5ea85f commit 5901a2d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/codegen/issues/issue-123712-str-to-lower-autovectorization.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
// CHECK-NEXT: [[C:%[0-9]]] = bitcast <16 x i1> [[B]] to i16
1111
#[no_mangle]
1212
pub fn lower_while_ascii(mut input: &[u8], mut output: &mut [u8]) -> usize {
13-
// process the input in chunks to enable auto-vectorization
14-
const USIZE_SIZE: usize = core::mem::size_of::<usize>();
15-
const MAGIC_UNROLL: usize = 2;
16-
const N: usize = USIZE_SIZE * MAGIC_UNROLL;
13+
// Process the input in chunks to enable auto-vectorization.
14+
// The real implementation makes this dependant on the size of usize,
15+
// but that would require changing the CHECK assertions based on the platform.
16+
const N: usize = 16;
1717

1818
output = &mut output[..input.len()];
1919

0 commit comments

Comments
 (0)