about summary refs log tree commit diff
path: root/src/test/codegen/repeat-trusted-len.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/codegen/repeat-trusted-len.rs')
-rw-r--r--src/test/codegen/repeat-trusted-len.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/codegen/repeat-trusted-len.rs b/src/test/codegen/repeat-trusted-len.rs
index 87f29f6047c..40399e8f76f 100644
--- a/src/test/codegen/repeat-trusted-len.rs
+++ b/src/test/codegen/repeat-trusted-len.rs
@@ -14,6 +14,10 @@ pub fn helper(_: usize) {
 // CHECK-LABEL: @repeat_take_collect
 #[no_mangle]
 pub fn repeat_take_collect() -> Vec<u8> {
-// CHECK: call void @llvm.memset.p0i8.[[USIZE]](i8* {{(nonnull )?}}align 1 %{{[0-9]+}}, i8 42, [[USIZE]] 100000, i1 false)
+// FIXME: At the time of writing LLVM transforms this loop into a single
+// `store` and then a `memset` with size = 99999. The correct check should be:
+//        call void @llvm.memset.p0i8.[[USIZE]](i8* {{(nonnull )?}}align 1 %{{[a-z0-9.]+}}, i8 42, [[USIZE]] 100000, i1 false)
+
+// CHECK: call void @llvm.memset.p0i8.[[USIZE]](i8* {{(nonnull )?}}align 1 %{{[a-z0-9.]+}}, i8 42, [[USIZE]] 99999, i1 false)
     iter::repeat(42).take(100000).collect()
 }