In order to keep our CI green, I'm just filing this now and we'll skip that test until this bug is fixed. Failure looks like this:
/var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs:17:17: error: CHECK-NEXT: is not on the line after the previous match
// CHECK-NEXT: assume
^
/var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:21:20: note: 'next' match was here
declare void @llvm.assume(i1 noundef) #1
^
/var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:16:21: note: previous match ended here
%_4 = load i32, ptr %_6, align 4, !noundef !4
^
/var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll:17:1: note: non-matching line after previous match is here
ret i32 %_4
^
Input file: /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/build/x86_64-unknown-linux-gnu/test/codegen-llvm/issues/issue-107681-unwrap_unchecked/issue-107681-unwrap_unchecked.ll
Check file: /var/lib/buildkite-agent/builds/rust-llvm-integrate/llvm-project/rust-llvm-integrate-prototype/tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
1: ; ModuleID = 'issue_107681_unwrap_unchecked.67fd71670d665894-cgu.0'
2: source_filename = "issue_107681_unwrap_unchecked.67fd71670d665894-cgu.0"
3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
4: target triple = "x86_64-unknown-linux-gnu"
5:
6: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: write, target_mem: none) uwtable
7: define noundef i32 @foo(ptr noalias nofree noundef align 8 captures(none) dereferenceable(16) %x) unnamed_addr #0 {
8: start:
9: %_6 = load ptr, ptr %x, align 8, !nonnull !4, !noundef !4
10: %0 = getelementptr inbounds nuw i8, ptr %x, i64 8
11: %_7 = load ptr, ptr %0, align 8, !nonnull !4, !noundef !4
12: %_8 = icmp ne ptr %_6, %_7
13: tail call void @llvm.assume(i1 %_8)
14: %_14 = getelementptr inbounds nuw i8, ptr %_6, i64 4
15: store ptr %_14, ptr %x, align 8
16: %_4 = load i32, ptr %_6, align 4, !noundef !4
next:17'0 { search range start (exclusive)
17: ret i32 %_4
18: }
19:
20: ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write)
21: declare void @llvm.assume(i1 noundef) #1
next:17'1 !~~~~~ error: match on wrong line
22:
23: attributes #0 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(read, argmem: readwrite, inaccessiblemem: write, target_mem: none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" }
24: attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) }
25:
26: !llvm.module.flags = !{!0, !1, !2}
27: !llvm.ident = !{!3}
28:
29: !0 = !{i32 8, !"PIC Level", i32 2}
30: !1 = !{i32 2, !"RtLibUseGOT", i32 1}
31: !2 = !{i32 7, !"uwtable", i32 2}
32: !3 = !{!"rustc version 1.98.0-dev"}
33: !4 = !{}
next:17'2 } search range end (exclusive)
>>>>>>
------------------------------------------
---- [codegen] tests/codegen-llvm/issues/issue-107681-unwrap_unchecked.rs stdout end ----
We initially fixed this with #158067, but that caused problems with layout randomization and was reverted in #158502.
In order to keep our CI green, I'm just filing this now and we'll skip that test until this bug is fixed. Failure looks like this: