Update call-llvm-intrinsics test for Rust 1.94.0 IR#153285
Update call-llvm-intrinsics test for Rust 1.94.0 IR#153285DeepeshWR wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
f51e581 to
dee56f5
Compare
This comment has been minimized.
This comment has been minimized.
dee56f5 to
5bb4a0a
Compare
|
r? folkertdev |
This comment has been minimized.
This comment has been minimized.
5bb4a0a to
04715b7
Compare
|
|
||
| //@ only-riscv64 | ||
| //@ revisions: host riscv64gc | ||
| //@ [host] only-riscv64 |
There was a problem hiding this comment.
Why is there a host revision?
There was a problem hiding this comment.
so that if you run on a particular riscv machine you'd use the host target?
That is what the test did originally. In this particular instance I'm not sure why behavior would vary for e.g. a 32-bit target, but the extra test is cheap.
There was a problem hiding this comment.
If we want to add 32-bit coverage we should to that using an explicit 32-bit revision.
IMHO we should only have host codegen tests if minicore tests for specific targets are not possible (e.g. due to std dependency).
There was a problem hiding this comment.
I've been bitten in the past by some minicore test just not running for a relevant target. But, in this particular case it probably has little value
@DeepeshWR can you replace the host revision with some 32-bit riscv one (that will need its own line for the target, and also needs the llvm component).
There was a problem hiding this comment.
@folkertdev Thanks for the clarification. I’ve made the suggested changes and replaced the host revision with an explicit 32-bit RISC-V one, including the required LLVM component as well.
Rust 1.94 now passes constants directly to llvm.sqrt.f32 instead of
storing/loading via the stack.
- Updated the FileCheck pattern to match the new IR:
// CHECK: call float @llvm.sqrt.f32(float 4.000000e+00)
The test intent is unchanged: it still ensures the intrinsic is
emitted as a 'call' (not 'invoke').
- Removed unnecessary local variables and Drop usage to work in
`#![no_core]` mode with minicore.
- Added required crate attributes:
#![feature(no_core, lang_items)]
#![no_std]
#![no_core]
- Replaced `//@ only-riscv64` (host-based execution) with explicit
revisions for:
riscv32gc-unknown-linux-gnu
riscv64gc-unknown-linux-gnu
This ensures deterministic multi-target coverage in CI without
relying on the host architecture.
- Added `//@ needs-llvm-components: riscv` and
`//@ min-llvm-version: 21` for CI compatibility.
Signed-off-by: Deepesh Varatharajan <[email protected]>
04715b7 to
1d678f6
Compare
Rust 1.94 now passes constants directly to llvm.sqrt.f32 instead of
storing/loading via the stack.
Updated the FileCheck pattern to match the new IR:
// CHECK: call float @llvm.sqrt.f32(float 4.000000e+00)
The test intent is unchanged: it still ensures the intrinsic is
emitted as a 'call' (not 'invoke').
Removed unnecessary local variables and Drop usage to work in
#![no_core]mode with minicore.Added required crate attributes:
#![feature(no_core, lang_items)]
#![no_std]
#![no_core]
Replaced
//@ only-riscv64(host-based execution) with explicitrevisions for:
riscv32gc-unknown-linux-gnu
riscv64gc-unknown-linux-gnu
This ensures deterministic multi-target coverage in CI without
relying on the host architecture.
Added
//@ needs-llvm-components: riscvand//@ min-llvm-version: 21for CI compatibility.Fixes #153271