mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 07:46:07 +00:00

These flags are usable on floating point arithmetic, as well as call, select, and phi instructions whose resulting type is floating point, or a vector of, or an array of, a valid type. Whether or not the flags are valid for a given instruction can be checked with the new LLVMCanValueUseFastMathFlags function. These are exposed using a new LLVMFastMathFlags type, which is an alias for unsigned. An anonymous enum defines the bit values for it. Tests are added in echo.ll for select/phil/call, and the floating point types in the new float_ops.ll bindings test. Select and the floating point arithmetic instructions were not implemented in llvm-c-test/echo.cpp, so they were added as well.