🤖 AI Summary
Scientific computing programs rely on aggressive floating-point optimizations—such as fused multiply-add (FMA)—to improve performance, yet must rigorously preserve numerical correctness.
Method: This work presents the first formal verification of FMA optimization at the LLVM IR level within the Rocq theorem prover, built upon the Verified LLVM framework. It formally models IEEE 754-compliant floating-point semantics in LLVM IR, enables path-sensitive, precise preservation reasoning, and designs a scalable verification architecture to accommodate more complex program structures and optimization patterns.
Contribution/Results: The approach proves semantic equivalence for FMA replacements of arithmetic expressions of the form $a imes b + c$ within basic blocks. Experimental validation confirms the mathematical correctness of FMA substitution, establishing the first end-to-end, IR-level formal verification of floating-point optimizations for trustworthy high-performance compilers.
📝 Abstract
Scientific computing programs often undergo aggressive compiler optimization to achieve high performance and efficient resource utilization. While performance is critical, we also need to ensure that these optimizations are correct. In this paper, we focus on a specific class of optimizations, floating-point optimizations, notably due to fast math, at the LLVM IR level. We present a preliminary work, which leverages the Verified LLVM framework in the Rocq theorem prover, to prove the correctness of Fused-Multiply-Add (FMA) optimization for a basic block implementing the arithmetic expression $a * b + c$ . We then propose ways to extend this preliminary results by adding more program features and fast math floating-point optimizations.