Skip to content

Commit f51e581

Browse files
committed
Update call-llvm-intrinsics test for Rust 1.94.0 IR
- 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) - Test intent unchanged: still ensures that the intrinsic is emitted as a 'call' (not 'invoke'). - Added annotations for CI portability: //@ add-minicore //@ needs-llvm-components: riscv Fixes #153271 Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
1 parent 8d50bcc commit f51e581

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/codegen-llvm/riscv-abi/call-llvm-intrinsics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
//@ add-minicore
12
//@ compile-flags: -C no-prepopulate-passes
2-
3+
//@ needs-llvm-components: riscv
34
//@ only-riscv64
45

56
#![feature(link_llvm_intrinsics)]
@@ -23,8 +24,7 @@ pub fn do_call() {
2324

2425
unsafe {
2526
// Ensure that we `call` LLVM intrinsics instead of trying to `invoke` them
26-
// CHECK: store float 4.000000e+00, ptr %{{.}}, align 4
27-
// CHECK: call float @llvm.sqrt.f32(float %{{.}}
27+
// CHECK: call float @llvm.sqrt.f32(float 4.000000e+00)
2828
sqrt(4.0);
2929
}
3030
}

0 commit comments

Comments
 (0)