Enable vector pair load/store for memcpy on -mcpu=future
Optimizes memcpy and string built-ins for the 'future' PowerPC CPU by enabling vector pair load/store instructions.
This change enables the use of vector pair load and store instructions for optimizing memory and string built-in functions, such as memcpy, when the -mcpu=future flag is used on PowerPC. It also introduces and documents the -mblock-ops-vector-pair option, which controls this behavior and can be set by specific -mcpu values. A new test case is added to verify this functionality.
In Details
This commit enables the use of lvebx and stvebx (load/store vector pair) instructions for optimizing memcpy and similar string builtins when -mcpu=future is specified. Previously, these optimizations were not enabled for this generic 'future' CPU type. The patch also formalizes -mblock-ops-vector-pair as a tunable option controlled by the CPU type and adds a test case.
- memcpy
- A standard C library function that copies a block of memory from one location to another. Optimized implementations are crucial for performance.
- -mcpu=future
- A GCC compiler flag targeting a future, unspecified PowerPC processor. This allows enabling features intended for upcoming hardware.
- vector pair load/store
- Instructions that load or store two consecutive vector registers as a single operation, improving efficiency for memory operations on larger data blocks.