Add power9/10 float-to-logical optimizations
Optimizes floating-point math library functions on PowerPC by using specialized instructions for float-to-logical conversions.
This commit enhances optimizations for 32-bit floating-point math functions in Glibc on PowerPC processors (power9 and later). It revises how floating-point values are converted to logical representations, leveraging specific vector instructions like XXLAND and XXSPLT to improve efficiency. Previously, these optimizations were present for power8 but regressed for newer architectures.
In Details
This patch re-enables and refines scalar floating-point to integer conversion optimizations for glibc math functions on power9/10/11. It addresses a regression where the optimized code path for power8 was not used on newer PowerPC architectures. The change introduces a new sequence using vector instructions (like xxland, xxsplt) to handle the conversion and masking more efficiently within vector registers, avoiding unnecessary scalar-to-vector and back conversions.
- float to logical optimization
- A compiler optimization that converts floating-point numbers to their underlying logical (integer) representations using efficient instructions, often for bitwise operations or specific data manipulations.
- PowerPC
- A RISC instruction set architecture developed by Apple, IBM, and Motorola. GCC supports various versions like Power8, Power9, and Power10.
- vector instructions
- CPU instructions that perform the same operation on multiple data points simultaneously, significantly improving performance for parallelizable tasks.