diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-07-21 14:34:12 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-07-22 14:28:48 +0200 |
| commit | a27f3e3fd1e4d16160f8885b6b06665b5319f56c (patch) | |
| tree | b033935392cbadf6f85d2dbddf433a88e323aeeb /tests/codegen/call-llvm-intrinsics.rs | |
| parent | ed93c1783b404d728d4809973a0550eb33cd293f (diff) | |
| download | rust-a27f3e3fd1e4d16160f8885b6b06665b5319f56c.tar.gz rust-a27f3e3fd1e4d16160f8885b6b06665b5319f56c.zip | |
Rename `tests/codegen` into `tests/codegen-llvm`
Diffstat (limited to 'tests/codegen/call-llvm-intrinsics.rs')
| -rw-r--r-- | tests/codegen/call-llvm-intrinsics.rs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/codegen/call-llvm-intrinsics.rs b/tests/codegen/call-llvm-intrinsics.rs deleted file mode 100644 index dc7e0249cb6..00000000000 --- a/tests/codegen/call-llvm-intrinsics.rs +++ /dev/null @@ -1,30 +0,0 @@ -//@ compile-flags: -C no-prepopulate-passes -Copt-level=0 - -//@ ignore-riscv64 -//@ ignore-loongarch64 - -#![feature(link_llvm_intrinsics)] -#![crate_type = "lib"] - -struct A; - -impl Drop for A { - fn drop(&mut self) { - println!("A"); - } -} - -extern "C" { - #[link_name = "llvm.sqrt.f32"] - fn sqrt(x: f32) -> f32; -} - -pub fn do_call() { - let _a = A; - - unsafe { - // Ensure that we `call` LLVM intrinsics instead of trying to `invoke` them - // CHECK: call float @llvm.sqrt.f32(float 4.000000e+00 - sqrt(4.0); - } -} |
