diff --git a/.gitmodules b/.gitmodules index 9f9d573668245..9d04fae237505 100644 --- a/.gitmodules +++ b/.gitmodules @@ -25,7 +25,7 @@ [submodule "src/llvm-project"] path = src/llvm-project url = https://github.com/rust-lang/llvm-project.git - branch = rustc/22.1-2026-05-19 + branch = rustc/23.1-2026-07-22 shallow = true [submodule "src/doc/embedded-book"] path = src/doc/embedded-book diff --git a/compiler/rustc_codegen_cranelift/src/abi/mod.rs b/compiler/rustc_codegen_cranelift/src/abi/mod.rs index 491463865b5db..b6e42ede72dcc 100644 --- a/compiler/rustc_codegen_cranelift/src/abi/mod.rs +++ b/compiler/rustc_codegen_cranelift/src/abi/mod.rs @@ -139,13 +139,19 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> { mut returns: Vec, args: &[Value], ) -> Cow<'_, [Value]> { - // Pass i128 arguments by-ref on Windows. + // On x86_64 Windows f128 is passed and returned indirectly (sret in LLVM terminology). + let indirect_f128 = + self.tcx.sess.target.is_like_windows && self.tcx.sess.target.arch == Arch::X86_64; + + // Pass i128 (and, on x86_64 Windows, f128) arguments by-ref. let (params, args): (Vec<_>, Cow<'_, [_]>) = if self.tcx.sess.target.is_like_windows { let (params, args): (Vec<_>, Vec<_>) = params .into_iter() .zip(args) .map(|(param, &arg)| { - if param.value_type == types::I128 { + if param.value_type == types::I128 + || (indirect_f128 && param.value_type == types::F128) + { let arg_ptr = self.create_stack_slot(16, 16); arg_ptr.store(self, arg, MemFlags::trusted()); (AbiParam::new(self.pointer_type), arg_ptr.get_addr(self)) @@ -161,6 +167,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> { }; let ret_single_i128 = returns.len() == 1 && returns[0].value_type == types::I128; + let ret_single_f128 = returns.len() == 1 && returns[0].value_type == types::F128; if ret_single_i128 && self.tcx.sess.target.is_like_windows { // Return i128 using the vector ABI on Windows returns[0].value_type = types::I64X2; @@ -168,8 +175,11 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> { let ret = self.lib_call_unadjusted(name, params, returns, &args)[0]; Cow::Owned(vec![codegen_bitcast(self, types::I128, ret)]) - } else if ret_single_i128 && self.tcx.sess.target.arch == Arch::S390x { - // Return i128 using a return area pointer on s390x. + } else if (ret_single_i128 && self.tcx.sess.target.arch == Arch::S390x) + || (ret_single_f128 && indirect_f128) + { + // Return x86_64 Windows f128 and s390x i128 indirectly (sret in LLVM terminology). + let ret_ty = returns[0].value_type; let mut params = params; let mut args = args.to_vec(); @@ -179,7 +189,7 @@ impl<'tcx> FunctionCx<'_, '_, 'tcx> { self.lib_call_unadjusted(name, params, vec![], &args); - Cow::Owned(vec![ret_ptr.load(self, types::I128, MemFlags::trusted())]) + Cow::Owned(vec![ret_ptr.load(self, ret_ty, MemFlags::trusted())]) } else { Cow::Borrowed(self.lib_call_unadjusted(name, params, returns, &args)) } diff --git a/compiler/rustc_target/src/callconv/x86_win64.rs b/compiler/rustc_target/src/callconv/x86_win64.rs index 4aaf34e56ce4b..8e6f50bc9e5c4 100644 --- a/compiler/rustc_target/src/callconv/x86_win64.rs +++ b/compiler/rustc_target/src/callconv/x86_win64.rs @@ -1,4 +1,4 @@ -use rustc_abi::{BackendRepr, Float, Integer, Primitive, Size, TyAbiInterface}; +use rustc_abi::{BackendRepr, Integer, Primitive, Size, TyAbiInterface}; use crate::callconv::{ArgAbi, FnAbi, Reg}; use crate::spec::{HasTargetSpec, RustcAbi}; @@ -35,11 +35,7 @@ where // FIXME(#134288): This may change for the `-msvc` targets in the future. a.cast_to(Reg::opaque_vector(Size::from_bits(128))); } - } else if a.layout.size.bytes() > 8 - && !matches!(scalar.primitive(), Primitive::Float(Float::F128)) - { - // Match what LLVM does for `f128` so that `compiler-builtins` builtins match up - // with what LLVM expects. + } else if a.layout.size.bytes() > 8 { a.make_indirect(); } else { a.extend_integer_width_to(32); diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index b74dd7dc3b987..fdc22577747da 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1070,6 +1070,7 @@ fn copy_src_dirs( static LLVM_PROJECTS: &[&str] = &[ "llvm-project/clang", + "llvm-project/libc", "llvm-project/libunwind", "llvm-project/lld", "llvm-project/lldb", diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index 0c7806342a1e6..fc4c4b8707122 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -407,6 +407,8 @@ impl Step for Llvm { // equally well everywhere. if builder.llvm_link_shared() { cfg.define("LLVM_LINK_LLVM_DYLIB", "ON"); + // Keep the pre-LLVM23 behavior for now. + cfg.define("LLVM_VERSIONED_DYLIB_NAME_ON_DARWIN", "OFF"); } if (target.starts_with("csky") diff --git a/src/ci/docker/scripts/build-clang.sh b/src/ci/docker/scripts/build-clang.sh index b3b1dc47e2ef7..ed293b2211598 100755 --- a/src/ci/docker/scripts/build-clang.sh +++ b/src/ci/docker/scripts/build-clang.sh @@ -5,7 +5,7 @@ set -ex source shared.sh # Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh -LLVM=llvmorg-22.1.0-rc2 +LLVM=llvmorg-23.1.0-rc1 mkdir llvm-project cd llvm-project diff --git a/src/ci/github-actions/jobs.yml b/src/ci/github-actions/jobs.yml index a8eebe7599fda..39578f70a04ca 100644 --- a/src/ci/github-actions/jobs.yml +++ b/src/ci/github-actions/jobs.yml @@ -742,9 +742,11 @@ auto: - name: dist-i686-mingw env: + # Disable RISCV target because building it OOMs. RUST_CONFIGURE_ARGS: >- --build=i686-pc-windows-gnu --enable-full-tools + --set llvm.targets=AArch64;AMDGPU;ARM;BPF;Hexagon;LoongArch;MSP430;Mips;NVPTX;PowerPC;Sparc;SystemZ;WebAssembly;X86 SCRIPT: python x.py dist bootstrap --include-default-paths DIST_REQUIRE_ALL_TOOLS: 1 CODEGEN_BACKENDS: llvm,cranelift diff --git a/src/llvm-project b/src/llvm-project index 52ed14fcd56af..21cf284327989 160000 --- a/src/llvm-project +++ b/src/llvm-project @@ -1 +1 @@ -Subproject commit 52ed14fcd56afc30f9cccd8ca8ce237c2eef7e04 +Subproject commit 21cf28432798952d942bacc6bcee3a328faa3638 diff --git a/tests/assembly-llvm/x86_64-windows-float-abi.rs b/tests/assembly-llvm/x86_64-windows-float-abi.rs index b6ab9995fdb3e..3b9d85b279ca7 100644 --- a/tests/assembly-llvm/x86_64-windows-float-abi.rs +++ b/tests/assembly-llvm/x86_64-windows-float-abi.rs @@ -3,9 +3,6 @@ //@ compile-flags: --target x86_64-pc-windows-msvc //@ needs-llvm-components: x86 //@ add-minicore -//@ revisions: LLVM22 LLVM23 -//@ [LLVM22] max-llvm-major-version: 22 -//@ [LLVM23] min-llvm-version: 23 #![feature(f16, f128)] #![feature(no_core)] @@ -40,12 +37,10 @@ pub extern "C" fn second_f64(_: f64, x: f64) -> f64 { } // CHECK-LABEL: second_f128 -// LLVM22: movaps (%rdx), %xmm0 -// LLVM22-NEXT: retq -// LLVM23: movq %rcx, %rax -// LLVM23-NEXT: movaps (%r8), %xmm0 -// LLVM23-NEXT: movaps %xmm0, (%rcx) -// LLVM23-NEXT: retq +// CHECK: movq %rcx, %rax +// CHECK-NEXT: movaps (%r8), %xmm0 +// CHECK-NEXT: movaps %xmm0, (%rcx) +// CHECK-NEXT: retq #[no_mangle] pub extern "C" fn second_f128(_: f128, x: f128) -> f128 { x diff --git a/tests/coverage/async.cov-map b/tests/coverage/async.cov-map index d75c4b5981a05..b4304a43d64e6 100644 --- a/tests/coverage/async.cov-map +++ b/tests/coverage/async.cov-map @@ -166,7 +166,7 @@ Number of file 0 mappings: 1 Highest counter ID seen: c0 Function name: async::i::{closure#0} -Raw bytes (75): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0d, 01, 2c, 13, 00, 14, 01, 04, 0b, 00, 0c, 09, 01, 09, 00, 0a, 01, 00, 0e, 00, 0f, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 02, 00, 0e, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02] +Raw bytes (75): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0d, 01, 2c, 13, 00, 14, 01, 04, 0b, 00, 0c, 09, 01, 09, 00, 0a, 01, 00, 0e, 00, 18, 01, 00, 0e, 00, 0f, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 02, 00, 0e, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async.rs Number of expressions: 3 @@ -177,8 +177,8 @@ Number of file 0 mappings: 13 - Code(Counter(0)) at (prev + 44, 19) to (start + 0, 20) - Code(Counter(0)) at (prev + 4, 11) to (start + 0, 12) - Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15) - Code(Counter(0)) at (prev + 0, 14) to (start + 0, 24) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15) - Code(Counter(1)) at (prev + 0, 28) to (start + 0, 33) - Code(Counter(2)) at (prev + 0, 39) to (start + 0, 48) - Code(Counter(5)) at (prev + 1, 9) to (start + 0, 10) @@ -193,7 +193,7 @@ Number of file 0 mappings: 13 Highest counter ID seen: c5 Function name: async::j -Raw bytes (65): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0b, 01, 37, 01, 00, 0c, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 0f, 01, 00, 0e, 00, 1b, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 02, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02] +Raw bytes (65): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0b, 01, 37, 01, 00, 0c, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 1b, 01, 00, 0e, 00, 0f, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 02, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/async.rs Number of expressions: 3 @@ -204,8 +204,8 @@ Number of file 0 mappings: 11 - Code(Counter(0)) at (prev + 55, 1) to (start + 0, 12) - Code(Counter(0)) at (prev + 11, 11) to (start + 0, 12) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 10) -- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15) - Code(Counter(0)) at (prev + 0, 14) to (start + 0, 27) +- Code(Counter(0)) at (prev + 0, 14) to (start + 0, 15) - Code(Counter(1)) at (prev + 0, 31) to (start + 0, 39) - Code(Counter(2)) at (prev + 1, 9) to (start + 0, 10) - Code(Expression(0, Sub)) at (prev + 0, 14) to (start + 0, 26) diff --git a/tests/coverage/async.coverage b/tests/coverage/async.coverage index 9409e6b1deb85..fe1a353b5f1a1 100644 --- a/tests/coverage/async.coverage +++ b/tests/coverage/async.coverage @@ -4,7 +4,7 @@ LL| |#![rustfmt::skip] LL| |//@ edition: 2018 LL| |//@ compile-flags: -Copt-level=1 - LL| | + LL| |//@ min-llvm-version: 23 LL| |//@ aux-build: executor.rs LL| |extern crate executor; LL| | diff --git a/tests/coverage/async.rs b/tests/coverage/async.rs index 777ad7ce7c0c3..d8f608df81535 100644 --- a/tests/coverage/async.rs +++ b/tests/coverage/async.rs @@ -4,7 +4,7 @@ #![rustfmt::skip] //@ edition: 2018 //@ compile-flags: -Copt-level=1 - +//@ min-llvm-version: 23 //@ aux-build: executor.rs extern crate executor; diff --git a/tests/coverage/coroutine.cov-map b/tests/coverage/coroutine.cov-map index daa42915a4af5..9599af9f0ab2c 100644 --- a/tests/coverage/coroutine.cov-map +++ b/tests/coverage/coroutine.cov-map @@ -1,11 +1,11 @@ Function name: coroutine::get_u32 -Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0b, 01, 00, 2d, 01, 01, 08, 00, 0b, 05, 01, 09, 00, 0e, 02, 02, 09, 00, 28, 01, 02, 01, 00, 02] +Raw bytes (31): 0x[01, 01, 01, 01, 05, 05, 01, 0c, 01, 00, 2d, 01, 01, 08, 00, 0b, 05, 01, 09, 00, 0e, 02, 02, 09, 00, 28, 01, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/coroutine.rs Number of expressions: 1 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) Number of file 0 mappings: 5 -- Code(Counter(0)) at (prev + 11, 1) to (start + 0, 45) +- Code(Counter(0)) at (prev + 12, 1) to (start + 0, 45) - Code(Counter(0)) at (prev + 1, 8) to (start + 0, 11) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 14) - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 40) @@ -14,14 +14,14 @@ Number of file 0 mappings: 5 Highest counter ID seen: c1 Function name: coroutine::main -Raw bytes (93): 0x[01, 01, 02, 01, 05, 05, 09, 11, 01, 13, 01, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 13, 01, 00, 14, 00, 22, 01, 00, 24, 00, 2a, 01, 00, 2b, 00, 2d, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 13, 05, 00, 0b, 00, 2e, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02] +Raw bytes (93): 0x[01, 01, 02, 01, 05, 05, 09, 11, 01, 14, 01, 00, 0a, 01, 01, 09, 00, 10, 01, 00, 13, 00, 2e, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 13, 01, 00, 14, 00, 22, 01, 00, 24, 00, 2a, 01, 00, 2b, 00, 2d, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 05, 00, 0b, 00, 13, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/coroutine.rs Number of expressions: 2 - expression 0 operands: lhs = Counter(0), rhs = Counter(1) - expression 1 operands: lhs = Counter(1), rhs = Counter(2) Number of file 0 mappings: 17 -- Code(Counter(0)) at (prev + 19, 1) to (start + 0, 10) +- Code(Counter(0)) at (prev + 20, 1) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) - Code(Counter(0)) at (prev + 0, 19) to (start + 0, 46) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) @@ -32,8 +32,8 @@ Number of file 0 mappings: 17 - Code(Counter(1)) at (prev + 1, 43) to (start + 0, 45) - Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20) = (c0 - c1) -- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 19) -- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 46) +- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46) +- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 19) - Code(Counter(1)) at (prev + 0, 20) to (start + 0, 34) - Code(Counter(3)) at (prev + 1, 34) to (start + 0, 39) - Code(Counter(2)) at (prev + 0, 44) to (start + 0, 46) @@ -43,12 +43,12 @@ Number of file 0 mappings: 17 Highest counter ID seen: c3 Function name: coroutine::main::{closure#0} -Raw bytes (24): 0x[01, 01, 00, 04, 01, 16, 08, 00, 09, 01, 01, 09, 00, 1f, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 17, 08, 00, 09, 01, 01, 09, 00, 1f, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/coroutine.rs Number of expressions: 0 Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 22, 8) to (start + 0, 9) +- Code(Counter(0)) at (prev + 23, 8) to (start + 0, 9) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 31) - Code(Counter(1)) at (prev + 1, 16) to (start + 0, 21) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6) diff --git a/tests/coverage/coroutine.coverage b/tests/coverage/coroutine.coverage index 611470c577388..02fc91bcf5863 100644 --- a/tests/coverage/coroutine.coverage +++ b/tests/coverage/coroutine.coverage @@ -1,3 +1,4 @@ + LL| |//@ min-llvm-version: 23 LL| |#![feature(coroutines, coroutine_trait, stmt_expr_attributes)] LL| | LL| |use std::ops::{Coroutine, CoroutineState}; diff --git a/tests/coverage/coroutine.rs b/tests/coverage/coroutine.rs index bd149764b3737..9a11abd934e4a 100644 --- a/tests/coverage/coroutine.rs +++ b/tests/coverage/coroutine.rs @@ -1,3 +1,4 @@ +//@ min-llvm-version: 23 #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] use std::ops::{Coroutine, CoroutineState}; diff --git a/tests/coverage/yield.cov-map b/tests/coverage/yield.cov-map index 87d0a0472615f..8c1da30c08b6c 100644 --- a/tests/coverage/yield.cov-map +++ b/tests/coverage/yield.cov-map @@ -1,5 +1,5 @@ Function name: yield::main -Raw bytes (139): 0x[01, 01, 05, 01, 05, 05, 09, 09, 11, 11, 15, 11, 15, 19, 01, 07, 01, 00, 0a, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 13, 01, 00, 0b, 00, 2e, 01, 00, 14, 00, 22, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 13, 05, 00, 0b, 00, 2e, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 03, 09, 00, 16, 09, 08, 0b, 00, 13, 09, 00, 0b, 00, 2e, 09, 00, 14, 00, 22, 11, 01, 27, 00, 29, 0a, 01, 0e, 00, 14, 11, 02, 0b, 00, 13, 11, 00, 0b, 00, 2e, 11, 00, 14, 00, 22, 12, 01, 27, 00, 29, 15, 01, 0e, 00, 14, 12, 02, 01, 00, 02] +Raw bytes (139): 0x[01, 01, 05, 01, 05, 05, 09, 09, 11, 11, 15, 11, 15, 19, 01, 08, 01, 00, 0a, 01, 01, 09, 00, 16, 01, 06, 0b, 00, 2e, 01, 00, 0b, 00, 13, 01, 00, 14, 00, 22, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 05, 00, 0b, 00, 13, 05, 00, 14, 00, 22, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 03, 09, 00, 16, 09, 08, 0b, 00, 2e, 09, 00, 0b, 00, 13, 09, 00, 14, 00, 22, 11, 01, 27, 00, 29, 0a, 01, 0e, 00, 14, 11, 02, 0b, 00, 2e, 11, 00, 0b, 00, 13, 11, 00, 14, 00, 22, 12, 01, 27, 00, 29, 15, 01, 0e, 00, 14, 12, 02, 01, 00, 02] Number of files: 1 - file 0 => $DIR/yield.rs Number of expressions: 5 @@ -9,30 +9,30 @@ Number of expressions: 5 - expression 3 operands: lhs = Counter(4), rhs = Counter(5) - expression 4 operands: lhs = Counter(4), rhs = Counter(5) Number of file 0 mappings: 25 -- Code(Counter(0)) at (prev + 7, 1) to (start + 0, 10) +- Code(Counter(0)) at (prev + 8, 1) to (start + 0, 10) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 22) -- Code(Counter(0)) at (prev + 6, 11) to (start + 0, 19) -- Code(Counter(0)) at (prev + 0, 11) to (start + 0, 46) +- Code(Counter(0)) at (prev + 6, 11) to (start + 0, 46) +- Code(Counter(0)) at (prev + 0, 11) to (start + 0, 19) - Code(Counter(0)) at (prev + 0, 20) to (start + 0, 34) - Code(Counter(1)) at (prev + 1, 39) to (start + 0, 41) - Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 20) = (c0 - c1) -- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 19) -- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 46) +- Code(Counter(1)) at (prev + 2, 11) to (start + 0, 46) +- Code(Counter(1)) at (prev + 0, 11) to (start + 0, 19) - Code(Counter(1)) at (prev + 0, 20) to (start + 0, 34) - Code(Counter(3)) at (prev + 1, 34) to (start + 0, 39) - Code(Counter(2)) at (prev + 0, 44) to (start + 0, 46) - Code(Expression(1, Sub)) at (prev + 1, 14) to (start + 0, 20) = (c1 - c2) - Code(Counter(2)) at (prev + 3, 9) to (start + 0, 22) -- Code(Counter(2)) at (prev + 8, 11) to (start + 0, 19) -- Code(Counter(2)) at (prev + 0, 11) to (start + 0, 46) +- Code(Counter(2)) at (prev + 8, 11) to (start + 0, 46) +- Code(Counter(2)) at (prev + 0, 11) to (start + 0, 19) - Code(Counter(2)) at (prev + 0, 20) to (start + 0, 34) - Code(Counter(4)) at (prev + 1, 39) to (start + 0, 41) - Code(Expression(2, Sub)) at (prev + 1, 14) to (start + 0, 20) = (c2 - c4) -- Code(Counter(4)) at (prev + 2, 11) to (start + 0, 19) -- Code(Counter(4)) at (prev + 0, 11) to (start + 0, 46) +- Code(Counter(4)) at (prev + 2, 11) to (start + 0, 46) +- Code(Counter(4)) at (prev + 0, 11) to (start + 0, 19) - Code(Counter(4)) at (prev + 0, 20) to (start + 0, 34) - Code(Expression(4, Sub)) at (prev + 1, 39) to (start + 0, 41) = (c4 - c5) @@ -42,24 +42,24 @@ Number of file 0 mappings: 25 Highest counter ID seen: c5 Function name: yield::main::{closure#0} -Raw bytes (24): 0x[01, 01, 00, 04, 01, 09, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06] +Raw bytes (24): 0x[01, 01, 00, 04, 01, 0a, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 10, 00, 15, 05, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/yield.rs Number of expressions: 0 Number of file 0 mappings: 4 -- Code(Counter(0)) at (prev + 9, 8) to (start + 0, 9) +- Code(Counter(0)) at (prev + 10, 8) to (start + 0, 9) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) - Code(Counter(1)) at (prev + 1, 16) to (start + 0, 21) - Code(Counter(1)) at (prev + 1, 5) to (start + 0, 6) Highest counter ID seen: c1 Function name: yield::main::{closure#1} -Raw bytes (34): 0x[01, 01, 00, 06, 01, 18, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 10, 00, 15, 0d, 01, 05, 00, 06] +Raw bytes (34): 0x[01, 01, 00, 06, 01, 19, 08, 00, 09, 01, 01, 09, 00, 10, 05, 01, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 10, 00, 15, 0d, 01, 05, 00, 06] Number of files: 1 - file 0 => $DIR/yield.rs Number of expressions: 0 Number of file 0 mappings: 6 -- Code(Counter(0)) at (prev + 24, 8) to (start + 0, 9) +- Code(Counter(0)) at (prev + 25, 8) to (start + 0, 9) - Code(Counter(0)) at (prev + 1, 9) to (start + 0, 16) - Code(Counter(1)) at (prev + 1, 9) to (start + 0, 16) - Code(Counter(2)) at (prev + 1, 9) to (start + 0, 16) diff --git a/tests/coverage/yield.coverage b/tests/coverage/yield.coverage index 2c133cbec5495..2fea2d94dae4b 100644 --- a/tests/coverage/yield.coverage +++ b/tests/coverage/yield.coverage @@ -1,3 +1,4 @@ + LL| |//@ min-llvm-version: 23 LL| |#![feature(coroutines, coroutine_trait, stmt_expr_attributes)] LL| |#![allow(unused_assignments)] LL| | diff --git a/tests/coverage/yield.rs b/tests/coverage/yield.rs index e02e3d3561243..da868e39f5893 100644 --- a/tests/coverage/yield.rs +++ b/tests/coverage/yield.rs @@ -1,3 +1,4 @@ +//@ min-llvm-version: 23 #![feature(coroutines, coroutine_trait, stmt_expr_attributes)] #![allow(unused_assignments)]