You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lower Rust fast floating-point intrinsics with explicit fast flags #186
IR-loweringLowering between dialects (dialect-mir to LLVM dialect)bugSomething isn't workingcodegenDevice code-generation pipeline (Rust MIR to IR to PTX)intrinsicsDevice intrinsics and libdevice math mappings
core::intrinsics::{fadd_fast,fsub_fast,fmul_fast,fdiv_fast,frem_fast} are generic compiler intrinsics with no MIR body. If they survive as placeholder calls, LLVM lowering can emit unresolved intrinsic symbols. A previous lowering attempt also used the default fast-math attribute, which is empty and does not express the Rust fast-intrinsic contract.
Why this matters
Fast floating-point intrinsics should become LLVM floating-point binops with explicit fast-math flags. Leaving placeholders or empty flags makes the lowering either invalid or semantically weaker than the intrinsic contract.
Expected behavior
The importer should recognize all five fast float intrinsics and emit known placeholders. MIR lowering should route those placeholders before the libdevice path and replace them with the matching LLVM float binop carrying explicit fast flags.
Acceptance criteria
fadd_fast, fsub_fast, fmul_fast, fdiv_fast, and frem_fast are recognized.
Both core::intrinsics and std::intrinsics spellings are covered.
Lowered LLVM ops use explicit FastmathFlags::FAST.
No unresolved placeholder call survives MIR lowering.
Tests cover all five operations for both f32 and f64.
IR-loweringLowering between dialects (dialect-mir to LLVM dialect)bugSomething isn't workingcodegenDevice code-generation pipeline (Rust MIR to IR to PTX)intrinsicsDevice intrinsics and libdevice math mappings
Activity