Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upTracking issue for `link_llvm_intrinsics` #29602
Comments
aturon
added
T-lang
B-unstable
labels
Nov 5, 2015
This comment has been minimized.
This comment has been minimized.
|
We should just kill this off; there aren't any in-tree users, and it would be impossible to stabilize because LLVM doesn't make any stability promises about intrinsics. |
This comment has been minimized.
This comment has been minimized.
|
I am using Some of these intrinsics belong in rustc, but even those would either remain unstable for a long period of time, or never be stabilized. This feature allows using these intrinsics out of tree for the benefit of the users of a nightly compiler (performance-wise). |
Mark-Simulacrum
added
the
C-tracking-issue
label
Jul 22, 2017
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
I've since switched to |
This comment has been minimized.
This comment has been minimized.
|
@aweinstock314 Are you still actively using this feature? |
This comment has been minimized.
This comment has been minimized.
|
@cramertj the The idea is to move the |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Is there a way to make features usable only in |
This comment has been minimized.
This comment has been minimized.
|
Some unstable features are named |
This comment has been minimized.
This comment has been minimized.
|
FWIW, this was really convenient as a way to try out whether an LLVM intrinsic is even helpful before doing all the work to make and propose a rustc intrinsic for it. |
This comment has been minimized.
This comment has been minimized.
aweinstock314
commented
Jan 28, 2018
|
I'm using this in https://crates.io/crates/prefetch, as mentioned; I'm also using it (through https://crates.io/crates/llvmint) in https://github.com/aweinstock314/libgarble-rust for AES-NI (inline assembly was generating suboptimal assembly relative to intrinsics). I don't think my usage depends on them being eventually stabilised, so the |
This comment has been minimized.
This comment has been minimized.
|
The AES-NI intrinsics might become stabilized in the future via |
This comment has been minimized.
This comment has been minimized.
|
As a concrete example of why I'd like this to stick around as forever-unstable, I could do the following to experiment with the new intrinsics mentioned in #55286 without a code change: #![feature(link_llvm_intrinsics)]
extern {
#[link_name="llvm.sadd.sat.i32"]
fn add_sat_i32(x: i32, y: i32) -> i32;
#[link_name="llvm.uadd.sat.i32"]
fn add_sat_u32(x: u32, y: u32) -> u32;
}
pub unsafe fn test_sfold(x: i32) -> i32 {
add_sat_i32(add_sat_i32(x, 10), 20)
}
pub unsafe fn test_ufold(x: u32) -> u32 {
add_sat_u32(add_sat_u32(x, 10), 20)
} |
aturon commentedNov 5, 2015
•
edited by scottmcm
Tracks
stabilization forthelink_llvm_intrinsicsfeature, used via#[link_name="llvm.*"].Edit: As this is obviously back-end specific, it will most likely never be stabilized.