AArch64 gains support for FEAT_FPRCVT floating-point conversion instructions.
GCC now supports ARMv8.6-A's FEAT_FPRCVT extension, enabling efficient floating-point to integer conversions with various rounding modes.
This update integrates the ARMv8.6-A FEAT_FPRCVT extension into GCC, introducing new support for floating-point to integer and integer to floating-point conversions. The change includes adding a new macro definition, updating instruction definition files, and expanding support for various conversion patterns. This enables more direct and potentially faster compilation of code using these specialized floating-point conversion operations on AArch64 targets that support the feature.
In Details
FEAT_FPRCVT is an ARMv8.6-A extension that provides new instructions for performing floating-point to integer and integer to floating-point conversions with directed rounding modes (e.g., round to nearest, round to zero, round up, round down). This commit adds the necessary GCC machinery to recognize, generate, and optimize for these instructions. Specifically, it updates aarch64.h with TARGET_FPRCVT, modifies aarch64.md to include new instruction patterns and enabling logic for fprcvt, and extends iterators.md to handle new floating-point types. This affects instruction selection a…
For Context
When a computer program works with numbers, it often needs to convert between different types, like a number with a decimal point (a 'floating-point' number) and a whole number (an 'integer'). The AArch64 architecture, used in many modern processors, has special instructions to do these conversions very efficiently. This commit adds support in GCC, a widely used compiler, for a new set of these specialized AArch64 instructions called FEAT_FPRCVT. This means that when you write code that converts floating-point numbers to integers or vice-versa, GCC can now generate more optimized and potentially faster machine code by using these new hardware features. This can lead to performance improvements in applications that perform a lot of these conversions, such as scientific computing or graphics. The changes involve various internal compiler files that define how AArch64 instructions are recognized and generated.