rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973)
Command line flag -Zreg-struct-return for X86 (32-bit) for rust-for-linux: https://github.com/rust-lang/rust/issues/116973.
This flag enables the same behavior as for abi_return_struct_as_int target spec.
Based on https://github.com/rust-lang/rust/pull/130432 PR (-Zregparm=N flag)
r? @cjgillot
rustbot has assigned @cjgillot. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
The job mingw-check-tidy failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
--stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#13 2.977 Building wheels for collected packages: reuse
#13 2.978 Building wheel for reuse (pyproject.toml): started
#13 3.233 Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.234 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#13 3.235 Stored in directory: /tmp/pip-ephem-wheel-cache-zaasmgtk/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#13 3.237 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#13 3.645 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#13 3.645 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#13 4.191 Collecting virtualenv
#13 4.191 Collecting virtualenv
#13 4.239 Downloading virtualenv-20.26.5-py3-none-any.whl (6.0 MB)
#13 4.420 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 33.7 MB/s eta 0:00:00
#13 4.481 Collecting platformdirs<5,>=3.9.1
#13 4.489 Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
#13 4.510 Collecting distlib<1,>=0.3.7
#13 4.528 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 55.4 MB/s eta 0:00:00
#13 4.566 Collecting filelock<4,>=3.12.2
#13 4.573 Downloading filelock-3.16.1-py3-none-any.whl (16 kB)
#13 4.573 Downloading filelock-3.16.1-py3-none-any.whl (16 kB)
#13 4.655 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 4.844 Successfully installed distlib-0.3.8 filelock-3.16.1 platformdirs-4.3.6 virtualenv-20.26.5
#13 DONE 4.9s
#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k: 198592 kB
DirectMap2M: 9238528 kB
DirectMap1G: 9437184 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2024-09-22/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/2024-09-22/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt
---
Compiling tidy v0.1.0 (/checkout/src/tools/tidy)
Finished `release` profile [optimized] target(s) in 29.61s
##[endgroup]
fmt check
Diff in /checkout/compiler/rustc_target/src/abi/call/mod.rs:900:
_ => (x86::Flavor::General, None),
};
let reg_struct_return = cx.x86_abi_opt().reg_struct_return;
- x86::compute_abi_info(
- cx, self, x86::X86Options { flavor, regparm, reg_struct_return }
- );
+ x86::compute_abi_info(cx, self, x86::X86Options {
+ flavor,
+ regparm,
+ });
}
}
"x86_64" => match abi {
spec::abi::Abi::SysV64 { .. } => x86_64::compute_abi_info(cx, self),
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_target/src/abi/call/m68k.rs" "/checkout/compiler/rustc_target/src/abi/call/hexagon.rs" "/checkout/compiler/rustc_target/src/abi/call/xtensa.rs" "/checkout/compiler/rustc_target/src/abi/call/powerpc64.rs" "/checkout/compiler/rustc_target/src/abi/call/wasm.rs" "/checkout/compiler/rustc_target/src/abi/call/msp430.rs" "/checkout/compiler/rustc_target/src/abi/call/s390x.rs" "/checkout/compiler/rustc_target/src/abi/call/x86_64.rs" "/checkout/compiler/rustc_target/src/abi/call/bpf.rs" "/checkout/compiler/rustc_target/src/abi/call/x86.rs" "/checkout/compiler/rustc_target/src/abi/call/amdgpu.rs" "/checkout/compiler/rustc_target/src/abi/call/arm.rs" "/checkout/compiler/rustc_target/src/abi/call/avr.rs" "/checkout/compiler/rustc_target/src/abi/call/x86_win64.rs" "/checkout/compiler/rustc_target/src/abi/call/mod.rs" "/checkout/compiler/rustc_target/src/abi/call/sparc64.rs" "/checkout/compiler/rustc_target/src/abi/call/nvptx64.rs" "/checkout/compiler/rustc_target/src/abi/call/loongarch.rs" "/checkout/compiler/rustc_target/src/abi/call/riscv.rs" "/checkout/compiler/rustc_target/src/abi/call/powerpc.rs" "/checkout/compiler/rustc_target/src/abi/call/mips64.rs" "/checkout/compiler/rustc_target/src/abi/call/sparc.rs" "/checkout/compiler/rustc_target/src/abi/call/mips.rs" "/checkout/compiler/rustc_target/src/abi/call/aarch64.rs" "/checkout/compiler/rustc_target/src/abi/mod.rs" "/checkout/tests/assembly/pie-relocation-model.rs" "/checkout/tests/assembly/panic-unwind-no-uwtable.rs" "/checkout/tests/assembly/x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs" "/checkout/tests/assembly/static-relocation-model.rs" "/checkout/tests/assembly/is_aligned.rs" "/checkout/tests/assembly/simd-intrinsic-mask-reduce.rs" "/checkout/tests/assembly/x86_64-no-jump-tables.rs" "/checkout/tests/assembly/nvptx-arch-target-cpu.rs" "/checkout/tests/assembly/x86_64-windows-float-abi.rs" "/checkout/tests/assembly/cmse.rs" "/checkout/tests/assembly/simd-intrinsic-scatter.rs" "/checkout/tests/assembly/nvptx-linking-cdylib.rs" "/checkout/tests/assembly/x86_64-cmp.rs" "/checkout/tests/assembly/strict_provenance.rs" "/checkout/tests/assembly/powerpc64-struct-abi.rs" "/checkout/tests/assembly/x86_64-typed-swap.rs" "/checkout/tests/assembly/panic-no-unwind-no-uwtable.rs" "/checkout/tests/coverage-run-rustdoc/doctest.rs" "/checkout/tests/coverage-run-rustdoc/auxiliary/doctest_crate.rs" "/checkout/tests/assembly/dwarf4.rs" "/checkout/tests/assembly/sparc-struct-abi.rs" "/checkout/tests/assembly/nvptx-atomics.rs" "/checkout/tests/assembly/nvptx-safe-naming.rs" "/checkout/tests/assembly/simd-intrinsic-mask-store.rs" "/checkout/tests/assembly/libs/issue-115339-zip-arrays.rs" "/checkout/tests/assembly/nvptx-c-abi-ret-v7.rs" "/checkout/tests/assembly/simd-intrinsic-select.rs" "/checkout/tests/assembly/closure-inherit-target-feature.rs" "/checkout/tests/assembly/auxiliary/non-inline-dependency.rs" "/checkout/tests/assembly/auxiliary/breakpoint-panic-handler.rs" "/checkout/tests/assembly/nvptx-kernel-abi/nvptx-kernel-args-abi-v7.rs" "/checkout/tests/assembly/targets/targets-nvptx.rs" "/checkout/tests/assembly/targets/targets-pe.rs" "/checkout/tests/assembly/targets/targets-elf.rs" "/checkout/tests/assembly/targets/targets-macho.rs" "/checkout/tests/assembly/niche-prefer-zero.rs" "/checkout/tests/assembly/simd/reduce-fadd-unordered.rs" "/checkout/tests/assembly/aarch64-pointer-auth.rs" "/checkout/compiler/rustc_target/src/abi/call/csky.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
local time: Tue Sep 24 09:46:31 UTC 2024
network time: Tue, 24 Sep 2024 09:46:31 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
The job mingw-check-tidy failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
--stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#13 2.826 Building wheels for collected packages: reuse
#13 2.827 Building wheel for reuse (pyproject.toml): started
#13 3.081 Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.082 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#13 3.082 Stored in directory: /tmp/pip-ephem-wheel-cache-quk0s3jb/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#13 3.084 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#13 3.484 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#13 3.484 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#13 4.031 Collecting virtualenv
#13 4.031 Collecting virtualenv
#13 4.087 Downloading virtualenv-20.26.5-py3-none-any.whl (6.0 MB)
#13 4.170 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.0/6.0 MB 74.6 MB/s eta 0:00:00
#13 4.215 Collecting distlib<1,>=0.3.7
#13 4.223 Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
#13 4.230 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 83.7 MB/s eta 0:00:00
#13 4.268 Collecting filelock<4,>=3.12.2
#13 4.277 Downloading filelock-3.16.1-py3-none-any.whl (16 kB)
#13 4.314 Collecting platformdirs<5,>=3.9.1
#13 4.322 Downloading platformdirs-4.3.6-py3-none-any.whl (18 kB)
#13 4.404 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 4.596 Successfully installed distlib-0.3.8 filelock-3.16.1 platformdirs-4.3.6 virtualenv-20.26.5
#13 DONE 4.7s
#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k: 206784 kB
DirectMap2M: 8181760 kB
DirectMap1G: 10485760 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://static.rust-lang.org/dist/2024-09-22/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/2024-09-22/rustfmt-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt
---
Finished `release` profile [optimized] target(s) in 30.41s
##[endgroup]
fmt check
fmt: checked 5590 files
Diff in /checkout/compiler/rustc_target/src/abi/call/mod.rs:900:
_ => (x86::Flavor::General, None),
};
let reg_struct_return = cx.x86_abi_opt().reg_struct_return;
- x86::compute_abi_info(
- cx,
- self,
- x86::X86Options { flavor, regparm, reg_struct_return },
- );
+ x86::compute_abi_info(cx, self, x86::X86Options {
+ flavor,
+ regparm,
+ });
}
}
"x86_64" => match abi {
spec::abi::Abi::SysV64 { .. } => x86_64::compute_abi_info(cx, self),
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/compiler/rustc_target/src/abi/call/csky.rs" "/checkout/compiler/rustc_mir_transform/src/dataflow_const_prop.rs" "/checkout/compiler/rustc_mir_transform/src/cost_checker.rs" "/checkout/compiler/rustc_target/src/abi/call/m68k.rs" "/checkout/compiler/rustc_target/src/abi/call/hexagon.rs" "/checkout/compiler/rustc_mir_transform/src/check_packed_ref.rs" "/checkout/compiler/rustc_target/src/abi/call/xtensa.rs" "/checkout/compiler/rustc_mir_transform/src/ctfe_limit.rs" "/checkout/compiler/rustc_target/src/abi/call/powerpc64.rs" "/checkout/compiler/rustc_mir_transform/src/remove_uninit_drops.rs" "/checkout/compiler/rustc_target/src/abi/call/wasm.rs" "/checkout/compiler/rustc_mir_transform/src/large_enums.rs" "/checkout/compiler/rustc_target/src/abi/call/msp430.rs" "/checkout/compiler/rustc_mir_transform/src/coroutine.rs" "/checkout/compiler/rustc_target/src/abi/call/s390x.rs" "/checkout/compiler/rustc_mir_transform/src/lint.rs" "/checkout/compiler/rustc_target/src/abi/call/x86_64.rs" "/checkout/compiler/rustc_mir_transform/src/remove_unneeded_drops.rs" "/checkout/compiler/rustc_target/src/abi/call/bpf.rs" "/checkout/compiler/rustc_mir_transform/src/deduce_param_attrs.rs" "/checkout/compiler/rustc_target/src/abi/call/x86.rs" "/checkout/compiler/rustc_mir_transform/src/nrvo.rs" "/checkout/compiler/rustc_target/src/abi/call/amdgpu.rs" "/checkout/compiler/rustc_mir_transform/src/sroa.rs" "/checkout/compiler/rustc_target/src/abi/call/arm.rs" "/checkout/compiler/rustc_mir_transform/src/copy_prop.rs" "/checkout/compiler/rustc_target/src/abi/call/avr.rs" "/checkout/compiler/rustc_mir_transform/src/remove_zsts.rs" "/checkout/compiler/rustc_target/src/abi/call/x86_win64.rs" "/checkout/compiler/rustc_mir_transform/src/mentioned_items.rs" "/checkout/compiler/rustc_target/src/abi/call/mod.rs" "/checkout/compiler/rustc_target/src/abi/call/sparc64.rs" "/checkout/compiler/rustc_target/src/abi/call/nvptx64.rs" "/checkout/compiler/rustc_target/src/abi/call/loongarch.rs" "/checkout/compiler/rustc_target/src/abi/call/riscv.rs" "/checkout/compiler/rustc_target/src/abi/call/powerpc.rs" "/checkout/compiler/rustc_target/src/abi/call/mips64.rs" "/checkout/compiler/rustc_target/src/abi/call/sparc.rs" "/checkout/compiler/rustc_target/src/abi/call/mips.rs" "/checkout/compiler/rustc_target/src/abi/call/aarch64.rs" "/checkout/compiler/rustc_target/src/abi/mod.rs" "/checkout/compiler/rustc_driver/src/lib.rs" "/checkout/compiler/rustc_mir_transform/src/jump_threading.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
local time: Tue Sep 24 12:13:21 UTC 2024
network time: Tue, 24 Sep 2024 12:13:21 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
------
> importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:30ca74372d8b771363f68f939a58b017a592fae4f69398600dc51145997160f03e9652051f957840c41898984a88855e9757fa23464703a5a4ba21316ddebb04:
------
##[endgroup]
Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure:
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
---- [codegen] tests/codegen/reg-struct-return.rs stdout ----
error: compilation failed!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/codegen/reg-struct-return.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--check-cfg" "cfg(FALSE)" "-O" "-Cdebug-assertions=no" "--emit" "llvm-ir" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/reg-struct-return/reg-struct-return.ll" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/reg-struct-return/auxiliary" "--target" "i686-unknown-linux-gnu" "-Zreg-struct-return" "-O" "-C" "no-prepopulate-passes"
--- stderr -------------------------------
error[E0463]: can't find crate for `std`
|
= note: the `i686-unknown-linux-gnu` target may not be installed
cc @ojeda
Some changes occurred in compiler/rustc_codegen_gcc
cc @antoyo, @GuillaumeGomez
These commits modify compiler targets. (See the Target Tier Policy.)
@rustbot label A-rust-for-linux @rustbot label A-ABI
The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
------
> importing cache manifest from ghcr.io/rust-lang/rust-ci-cache:20950f2ccee3dff53a038adf5c1cf05231c0b30772617126a5f6478a66316a29cba9aead69f7bb0004886d32c1f8e6287542cf6d25130711c82d16a66201d4fe:
------
##[endgroup]
Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure:
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'change-id=99999999', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
failures:
---- [codegen] tests/codegen/checked_ilog.rs stdout ----
error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-18/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_ilog/checked_ilog.ll" "/checkout/tests/codegen/checked_ilog.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/checked_ilog.rs:18:12: error: CHECK: expected string not found in input
/checkout/tests/codegen/checked_ilog.rs:18:12: error: CHECK: expected string not found in input
// CHECK: ret { i32, i32 }
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_ilog/checked_ilog.ll:36:55: note: scanning from here
_RNvMs5_NtCs44eS9qxX5Jk_4core3numt12checked_ilog.exit: ; preds = %start, %bb3.i, %bb6.preheader.i, %bb11.loopexit.i
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_ilog/checked_ilog.ll:48:23: note: possible intended match here
!0 = !{i32 8, !"PIC Level", i32 2}
Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_ilog/checked_ilog.ll
Check file: /checkout/tests/codegen/checked_ilog.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
1: ; ModuleID = 'checked_ilog.47ce1618df90af54-cgu.0'
2: source_filename = "checked_ilog.47ce1618df90af54-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: nofree norecurse nosync nounwind nonlazybind memory(none) uwtable
7: define i64 @checked_ilog(i16 noundef %val, i16 noundef %base) unnamed_addr #0 {
8: start:
9: %_3.i = icmp eq i16 %val, 0
10: %_4.i = icmp ult i16 %base, 2
11: %or.cond.i = or i1 %_3.i, %_4.i
12: br i1 %or.cond.i, label %_RNvMs5_NtCs44eS9qxX5Jk_4core3numt12checked_ilog.exit, label %bb3.i
13:
14: bb3.i: ; preds = %start
15: %_5.i = icmp ult i16 %val, %base
16: br i1 %_5.i, label %_RNvMs5_NtCs44eS9qxX5Jk_4core3numt12checked_ilog.exit, label %bb6.preheader.i
17:
18: bb6.preheader.i: ; preds = %bb3.i
19: %_14.i = udiv i16 %val, %base
20: %_12.not3.i = icmp ult i16 %_14.i, %base
21: br i1 %_12.not3.i, label %_RNvMs5_NtCs44eS9qxX5Jk_4core3numt12checked_ilog.exit, label %bb8.i
22:
23: bb11.loopexit.i: ; preds = %bb8.i
24: %0 = zext i32 %_16.0.i to i64
25: %1 = shl nuw i64 %0, 32
26: br label %_RNvMs5_NtCs44eS9qxX5Jk_4core3numt12checked_ilog.exit
27:
28: bb8.i: ; preds = %bb6.preheader.i, %bb8.i
29: %n.sroa.0.05.i = phi i32 [ %_16.0.i, %bb8.i ], [ 1, %bb6.preheader.i ]
30: %r.sroa.0.04.i = phi i16 [ %_17.0.i, %bb8.i ], [ %base, %bb6.preheader.i ]
31: %_16.0.i = add i32 %n.sroa.0.05.i, 1
32: %_17.0.i = mul i16 %r.sroa.0.04.i, %base
33: %_12.not.i = icmp ugt i16 %_17.0.i, %_14.i
34: br i1 %_12.not.i, label %bb11.loopexit.i, label %bb8.i
35:
36: _RNvMs5_NtCs44eS9qxX5Jk_4core3numt12checked_ilog.exit: ; preds = %start, %bb3.i, %bb6.preheader.i, %bb11.loopexit.i
check:18'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
37: %_0.sroa.4.0.i = phi i64 [ 0, %start ], [ 0, %bb3.i ], [ 4294967296, %bb6.preheader.i ], [ %1, %bb11.loopexit.i ]
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38: %_0.sroa.0.0.i = phi i64 [ 0, %start ], [ 1, %bb3.i ], [ 1, %bb6.preheader.i ], [ 1, %bb11.loopexit.i ]
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
39: %_0.sroa.0.0.insert.insert.i = or disjoint i64 %_0.sroa.0.0.i, %_0.sroa.4.0.i
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40: ret i64 %_0.sroa.0.0.insert.insert.i
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41: }
check:18'0 ~~
check:18'0 ~
check:18'0 ~
43: attributes #0 = { nofree norecurse nosync nounwind nonlazybind memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" }
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:18'0 ~
check:18'0 ~
45: !llvm.module.flags = !{!0, !1}
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46: !llvm.ident = !{!2}
check:18'0 ~~~~~~~~~~~~~~~~~~~~
check:18'0 ~
check:18'0 ~
48: !0 = !{i32 8, !"PIC Level", i32 2}
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:18'1 ? possible intended match
49: !1 = !{i32 2, !"RtLibUseGOT", i32 1}
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
50: !2 = !{!"rustc version 1.83.0-nightly (6f8b3e919 2024-09-29)"}
check:18'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------
---- [codegen] tests/codegen/checked_math.rs stdout ----
---- [codegen] tests/codegen/checked_math.rs stdout ----
error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-18/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll" "/checkout/tests/codegen/checked_math.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
--- stderr -------------------------------
/checkout/tests/codegen/checked_math.rs:14:16: error: CHECK-DAG: expected string not found in input
// CHECK-DAG: %[[IS_SOME:.+]] = icmp uge i16 %a, %b
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:10:65: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:10:65: note: scanning from here
define i32 @checked_sub_unsigned(i16 noundef %a, i16 noundef %b) unnamed_addr #0 {
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:12:2: note: possible intended match here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:12:2: note: possible intended match here
%_3 = icmp ult i16 %a, %b
^
/checkout/tests/codegen/checked_math.rs:34:16: error: CHECK-DAG: expected string not found in input
// CHECK-DAG: %[[DISCR:.+]] = zext i1 %[[IS_SOME]] to i32
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:22:65: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:22:65: note: scanning from here
define i64 @checked_shl_unsigned(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:22:65: note: with "IS_SOME" equal to "_3"
define i64 @checked_shl_unsigned(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:26:2: note: possible intended match here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:26:2: note: possible intended match here
%0 = zext i32 %_4 to i64
^
/checkout/tests/codegen/checked_math.rs:49:16: error: CHECK-DAG: expected string not found in input
// CHECK-DAG: %[[DISCR:.+]] = zext i1 %[[IS_SOME]] to i32
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:34:65: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:34:65: note: scanning from here
define i64 @checked_shr_unsigned(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:34:65: note: with "IS_SOME" equal to "_3"
define i64 @checked_shr_unsigned(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:38:2: note: possible intended match here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:38:2: note: possible intended match here
%0 = zext i32 %_4 to i64
^
/checkout/tests/codegen/checked_math.rs:64:16: error: CHECK-DAG: expected string not found in input
// CHECK-DAG: %[[DISCR:.+]] = zext i1 %[[IS_SOME]] to i32
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:46:63: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:46:63: note: scanning from here
define i64 @checked_shl_signed(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:46:63: note: with "IS_SOME" equal to "_3"
define i64 @checked_shl_signed(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:50:2: note: possible intended match here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:50:2: note: possible intended match here
%0 = zext i32 %_4 to i64
^
/checkout/tests/codegen/checked_math.rs:79:16: error: CHECK-DAG: expected string not found in input
// CHECK-DAG: %[[DISCR:.+]] = zext i1 %[[IS_SOME]] to i32
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:58:63: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:58:63: note: scanning from here
define i64 @checked_shr_signed(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:58:63: note: with "IS_SOME" equal to "_3"
define i64 @checked_shr_signed(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:62:2: note: possible intended match here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll:62:2: note: possible intended match here
%0 = zext i32 %_4 to i64
Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/checked_math/checked_math.ll
Check file: /checkout/tests/codegen/checked_math.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
1: ; ModuleID = 'checked_math.6fc8e87442f72df1-cgu.0'
2: source_filename = "checked_math.6fc8e87442f72df1-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: @alloc_8c221fd57e7d6c834cd6891d117402c2 = private unnamed_addr constant <{ [39 x i8] }> <{ [39 x i8] c"/checkout/tests/codegen/checked_math.rs" }>, align 1
7: @alloc_aabcfa90a781aeb2513755f62f0439aa = private unnamed_addr constant <{ ptr, [16 x i8] }> <{ ptr @alloc_8c221fd57e7d6c834cd6891d117402c2, [16 x i8] c"'\00\00\00\00\00\00\00c\00\00\00\16\00\00\00" }>, align 8
8:
9: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable
10: define i32 @checked_sub_unsigned(i16 noundef %a, i16 noundef %b) unnamed_addr #0 {
dag:14'0 X~~~~~~~~~~~~~~~~~~ error: no match found
dag:14'0 ~~~~~~~
dag:14'0 ~~~~~~~
12: %_3 = icmp ult i16 %a, %b
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:14'1 ? possible intended match
13: %_4 = sub nuw i16 %a, %b
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
14: %0 = zext i16 %_4 to i32
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
15: %1 = shl nuw i32 %0, 16
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
16: %2 = or disjoint i32 %1, 1
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
17: %_0.sroa.0.0.insert.insert = select i1 %_3, i32 0, i32 %2
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18: ret i32 %_0.sroa.0.0.insert.insert
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19: }
dag:14'0 ~~
dag:14'0 ~
dag:14'0 ~
21: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22: define i64 @checked_shl_unsigned(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
dag:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:34'0 X~~~~~~~~~~~~~~~~~~ error: no match found
dag:34'1 with "IS_SOME" equal to "_3"
dag:34'0 ~~~~~~~
dag:34'0 ~~~~~~~
24: %_3 = icmp ult i32 %b, 32
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
25: %_4 = shl i32 %a, %b
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~
26: %0 = zext i32 %_4 to i64
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:34'2 ? possible intended match
27: %1 = shl nuw i64 %0, 32
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
28: %2 = or disjoint i64 %1, 1
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29: %_0.sroa.0.0.insert.insert = select i1 %_3, i64 %2, i64 0
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30: ret i64 %_0.sroa.0.0.insert.insert
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31: }
dag:34'0 ~~
dag:34'0 ~
dag:34'0 ~
33: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34: define i64 @checked_shr_unsigned(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
dag:34'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:49'0 X~~~~~~~~~~~~~~~~~~ error: no match found
dag:49'1 with "IS_SOME" equal to "_3"
dag:49'0 ~~~~~~~
dag:49'0 ~~~~~~~
36: %_3 = icmp ult i32 %b, 32
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
37: %_4 = lshr i32 %a, %b
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~
38: %0 = zext i32 %_4 to i64
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:49'2 ? possible intended match
39: %1 = shl nuw i64 %0, 32
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
40: %2 = or disjoint i64 %1, 1
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41: %_0.sroa.0.0.insert.insert = select i1 %_3, i64 %2, i64 0
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42: ret i64 %_0.sroa.0.0.insert.insert
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
43: }
dag:49'0 ~~
dag:49'0 ~
dag:49'0 ~
45: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46: define i64 @checked_shl_signed(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
dag:49'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:64'0 X~~~~~~~~~~~~~~~~~~ error: no match found
dag:64'1 with "IS_SOME" equal to "_3"
dag:64'0 ~~~~~~~
dag:64'0 ~~~~~~~
48: %_3 = icmp ult i32 %b, 32
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
49: %_4 = shl i32 %a, %b
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~
50: %0 = zext i32 %_4 to i64
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:64'2 ? possible intended match
51: %1 = shl nuw i64 %0, 32
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
52: %2 = or disjoint i64 %1, 1
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53: %_0.sroa.0.0.insert.insert = select i1 %_3, i64 %2, i64 0
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54: ret i64 %_0.sroa.0.0.insert.insert
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55: }
dag:64'0 ~~
dag:64'0 ~
dag:64'0 ~
57: ; Function Attrs: mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58: define i64 @checked_shr_signed(i32 noundef %a, i32 noundef %b) unnamed_addr #0 {
dag:64'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:79'0 X~~~~~~~~~~~~~~~~~~ error: no match found
dag:79'1 with "IS_SOME" equal to "_3"
dag:79'0 ~~~~~~~
dag:79'0 ~~~~~~~
60: %_3 = icmp ult i32 %b, 32
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
61: %_4 = ashr i32 %a, %b
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~
62: %0 = zext i32 %_4 to i64
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~
dag:79'2 ? possible intended match
63: %1 = shl nuw i64 %0, 32
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
64: %2 = or disjoint i64 %1, 1
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65: %_0.sroa.0.0.insert.insert = select i1 %_3, i64 %2, i64 0
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
66: ret i64 %_0.sroa.0.0.insert.insert
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
67: }
dag:79'0 ~~
dag:79'0 ~
dag:79'0 ~
69: ; Function Attrs: nonlazybind uwtable
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70: define noundef i32 @checked_add_one_unwrap_unsigned(i32 noundef %x) unnamed_addr #1 {
dag:79'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71: start:
72: %_5.1 = icmp eq i32 %x, -1
73: br i1 %_5.1, label %bb2, label %bb3
74:
75: bb3: ; preds = %start
76: %_6 = add nuw i32 %x, 1
77: ret i32 %_6
78:
79: bb2: ; preds = %start
80: ; call core::option::unwrap_failed
81: tail call void @_RNvNtCs44eS9qxX5Jk_4core6option13unwrap_failed(ptr noalias noundef nonnull readonly align 8 dereferenceable(24) @alloc_aabcfa90a781aeb2513755f62f0439aa) #3
82: unreachable
83: }
85: ; core::option::unwrap_failed
85: ; core::option::unwrap_failed
86: ; Function Attrs: cold noinline noreturn nonlazybind uwtable
87: declare void @_RNvNtCs44eS9qxX5Jk_4core6option13unwrap_failed(ptr noalias noundef readonly align 8 dereferenceable(24)) unnamed_addr #2
88:
89: attributes #0 = { mustprogress nofree norecurse nosync nounwind nonlazybind willreturn memory(none) uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" }
90: attributes #1 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" }
91: attributes #2 = { cold noinline noreturn nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" }
92: attributes #3 = { noreturn }
93:
94: !llvm.module.flags = !{!0, !1}
95: !llvm.ident = !{!2}
96:
97: !0 = !{i32 8, !"PIC Level", i32 2}
98: !1 = !{i32 2, !"RtLibUseGOT", i32 1}
99: !2 = !{!"rustc version 1.83.0-nightly (6f8b3e919 2024-09-29)"}
------------------------------------------
---- [codegen] tests/codegen/const_scalar_pair.rs stdout ----
---- [codegen] tests/codegen/const_scalar_pair.rs stdout ----
error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-18/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/const_scalar_pair/const_scalar_pair.ll" "/checkout/tests/codegen/const_scalar_pair.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/const_scalar_pair.rs:6:12: error: CHECK: expected string not found in input
/checkout/tests/codegen/const_scalar_pair.rs:6:12: error: CHECK: expected string not found in input
// CHECK: ret { i32, i32 } { i32 1, i32 2 }
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/const_scalar_pair/const_scalar_pair.ll:1:1: note: scanning from here
; ModuleID = 'const_scalar_pair.5f67ee556cc5d8a1-cgu.0'
^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/const_scalar_pair/const_scalar_pair.ll:24:2: note: possible intended match here
!0 = !{i32 8, !"PIC Level", i32 2}
Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/const_scalar_pair/const_scalar_pair.ll
Check file: /checkout/tests/codegen/const_scalar_pair.rs
-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
1: ; ModuleID = 'const_scalar_pair.5f67ee556cc5d8a1-cgu.0'
check:6'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
2: source_filename = "const_scalar_pair.5f67ee556cc5d8a1-cgu.0"
check:6'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"
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4: target triple = "x86_64-unknown-linux-gnu"
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'0 ~
6: ; const_scalar_pair::foo
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~
7: ; Function Attrs: nonlazybind uwtable
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8: define i64 @_ZN17const_scalar_pair3foo17h57aa09d1bd6c742cE() unnamed_addr #0 !dbg !7 {
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'0 ~~~~~~~
10: %_0 = alloca [8 x i8], align 4
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11: store i32 1, ptr %_0, align 4, !dbg !19
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12: %0 = getelementptr inbounds i8, ptr %_0, i64 4, !dbg !19
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13: store i32 2, ptr %0, align 4, !dbg !19
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14: %1 = load i64, ptr %_0, align 4, !dbg !20
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15: ret i64 %1, !dbg !20
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~
16: }
check:6'0 ~~
check:6'0 ~
check:6'0 ~
18: attributes #0 = { nonlazybind uwtable "probe-stack"="inline-asm" "target-cpu"="x86-64" }
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'0 ~
check:6'0 ~
20: !llvm.module.flags = !{!0, !1, !2, !3}
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21: !llvm.ident = !{!4}
check:6'0 ~~~~~~~~~~~~~~~~~~~~
22: !llvm.dbg.cu = !{!5}
check:6'0 ~~~~~~~~~~~~~~~~~~~~~
check:6'0 ~
check:6'0 ~
24: !0 = !{i32 8, !"PIC Level", i32 2}
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:6'1 ? possible intended match
25: !1 = !{i32 2, !"RtLibUseGOT", i32 1}
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26: !2 = !{i32 2, !"Dwarf Version", i32 4}
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27: !3 = !{i32 2, !"Debug Info Version", i32 3}
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28: !4 = !{!"rustc version 1.83.0-nightly (6f8b3e919 2024-09-29)"}
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29: !5 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !6, producer: "clang LLVM (rustc version 1.83.0-nightly (6f8b3e919 2024-09-29))", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, splitDebugInlining: false, nameTableKind: None)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30: !6 = !DIFile(filename: "/checkout/tests/codegen/const_scalar_pair.rs/@/const_scalar_pair.5f67ee556cc5d8a1-cgu.0", directory: "/checkout/obj")
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31: !7 = distinct !DISubprogram(name: "foo", linkageName: "_ZN17const_scalar_pair3foo17h57aa09d1bd6c742cE", scope: !9, file: !8, line: 5, type: !10, scopeLine: 5, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !5, templateParams: !18)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32: !8 = !DIFile(filename: "/checkout/tests/codegen/const_scalar_pair.rs", directory: "", checksumkind: CSK_MD5, checksum: "785b808c1aaa4349d0381c61f13000d1")
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33: !9 = !DINamespace(name: "const_scalar_pair", scope: null)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34: !10 = !DISubroutineType(types: !11)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35: !11 = !{!12}
check:6'0 ~~~~~~~~~~~~~
36: !12 = !DICompositeType(tag: DW_TAG_structure_type, name: "(i32, i32)", file: !13, size: 64, align: 32, elements: !14, templateParams: !18, identifier: "2c1bcf4ad79d6ad2f309c4d2313d1b0")
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
37: !13 = !DIFile(filename: "<unknown>", directory: "")
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38: !14 = !{!15, !17}
check:6'0 ~~~~~~~~~~~~~~~~~~
39: !15 = !DIDerivedType(tag: DW_TAG_member, name: "__0", scope: !12, file: !13, baseType: !16, size: 32, align: 32)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40: !16 = !DIBasicType(name: "i32", size: 32, encoding: DW_ATE_signed)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41: !17 = !DIDerivedType(tag: DW_TAG_member, name: "__1", scope: !12, file: !13, baseType: !16, size: 32, align: 32, offset: 32)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42: !18 = !{}
check:6'0 ~~~~~~~~~~
43: !19 = !DILocation(line: 7, column: 5, scope: !7)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44: !20 = !DILocation(line: 8, column: 2, scope: !7)
check:6'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------------------
---- [codegen] tests/codegen/comparison-operators-2-tuple.rs stdout ----
---- [codegen] tests/codegen/comparison-operators-2-tuple.rs stdout ----
error: verification with 'FileCheck' failed
status: exit status: 1
command: "/usr/lib/llvm-18/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll" "/checkout/tests/codegen/comparison-operators-2-tuple.rs" "--check-prefix=CHECK" "--check-prefix" "NONMSVC" "--allow-unused-prefixes" "--dump-input-context" "100"
--- stderr -------------------------------
/checkout/tests/codegen/comparison-operators-2-tuple.rs:20:16: error: CHECK-SAME: expected string not found in input
/checkout/tests/codegen/comparison-operators-2-tuple.rs:20:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: (i16 noundef %[[A0:.+]], i16 noundef %[[A1:.+]], i16 noundef %[[B0:.+]], i16 noundef %[[B1:.+]])
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:7:43: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:7:43: note: scanning from here
define noundef zeroext i1 @check_lt_direct(i32 %0, i32 %1) unnamed_addr #0 {
/checkout/tests/codegen/comparison-operators-2-tuple.rs:32:16: error: CHECK-SAME: expected string not found in input
/checkout/tests/codegen/comparison-operators-2-tuple.rs:32:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: (i16 noundef %[[A0:.+]], i16 noundef %[[A1:.+]], i16 noundef %[[B0:.+]], i16 noundef %[[B1:.+]])
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:21:43: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:21:43: note: scanning from here
define noundef zeroext i1 @check_le_direct(i32 %0, i32 %1) unnamed_addr #0 {
/checkout/tests/codegen/comparison-operators-2-tuple.rs:44:16: error: CHECK-SAME: expected string not found in input
/checkout/tests/codegen/comparison-operators-2-tuple.rs:44:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: (i16 noundef %[[A0:.+]], i16 noundef %[[A1:.+]], i16 noundef %[[B0:.+]], i16 noundef %[[B1:.+]])
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:35:43: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:35:43: note: scanning from here
define noundef zeroext i1 @check_gt_direct(i32 %0, i32 %1) unnamed_addr #0 {
/checkout/tests/codegen/comparison-operators-2-tuple.rs:56:16: error: CHECK-SAME: expected string not found in input
/checkout/tests/codegen/comparison-operators-2-tuple.rs:56:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: (i16 noundef %[[A0:.+]], i16 noundef %[[A1:.+]], i16 noundef %[[B0:.+]], i16 noundef %[[B1:.+]])
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:49:43: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:49:43: note: scanning from here
define noundef zeroext i1 @check_ge_direct(i32 %0, i32 %1) unnamed_addr #0 {
/checkout/tests/codegen/comparison-operators-2-tuple.rs:77:16: error: CHECK-SAME: expected string not found in input
/checkout/tests/codegen/comparison-operators-2-tuple.rs:77:16: error: CHECK-SAME: expected string not found in input
// CHECK-SAME: (i16 noundef %[[A0:.+]], i16 noundef %[[A1:.+]], i16 noundef %[[B0:.+]], i16 noundef %[[B1:.+]])
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:63:44: note: scanning from here
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/comparison-operators-2-tuple/comparison-operators-2-tuple.ll:63:44: note: scanning from here
define noundef zeroext i1 @check_lt_via_cmp(i32 %0, i32 %1) unnamed_addr #0 {
/checkout/tests/codegen/comparison-operators-2-tuple.rs:89:16: error: CHECK-SAME: expected string not found in input
/checkout/tests/codegen/comparison-operators-2-tuple.rs:89:16: error: CHECK-SAME: expected string not found in input
Cc @vincenzopalazzo who was interested in this.
:umbrella: The latest upstream changes (presumably #131458) made this pull request unmergeable. Please resolve the merge conflicts.
I'm not in capacity to review this. r? compiler
r? @workingjubilee
I have mutated https://github.com/rust-lang/rust/issues/116973 into a tracking issue for this, so we do not need to open another one.
:umbrella: The latest upstream changes (presumably #132020) made this pull request unmergeable. Please resolve the merge conflicts.
:umbrella: The latest upstream changes (presumably #132079) made this pull request unmergeable. Please resolve the merge conflicts.
Reverted changes for "Rust" calling conv (flag works only for extern "C"-like calling conventions). Added unstable-book record, error about wrong arch and related test.
This should be purely additive: @bors r+ rollup
:pushpin: Commit 9aab517d6310223ac5a89c640723a64b695d49d2 has been approved by workingjubilee
It is now in the queue for this repository.