Reverse rotations with masked negative counts in generic RTL simplifier
Generic RTL simplifier reverses rotations with masked negative counts, preserving the count mask.
The generic RTL simplifier now correctly reverses rotations with masked negative counts. This change ensures that the reversed count remains within its valid range by keeping the count mask. New selftests for masked negative rotate operations are added for RISC-V and AArch64.
In Details
The simplify-rtx.cc file contains logic for simplifying RTL (Register Transfer Language) expressions. This commit modifies simplify_binary_operation_1 to correctly handle reversed rotations when the rotation count is masked and negative. The key is preserving the count mask during reversal to maintain the integrity of the rotation amount. New selftests are added to verify this behavior, particularly for architectures like RISC-V and AArch64 that utilize such operations.