Force using IOR for AOP expansion
Forces SH port to use IOR for AOP expansion to fix regressions.
Recent changes to address PR 108477 caused regressions on the SH port, with several tests failing that previously passed. To resolve these issues, this commit forces the Automatic Operand (AOP) expansion to use the Integer OR (IOR) instruction for the SH architecture, fixing the observed regressions.
In Details
This commit modifies the SH target's instruction selection logic in config/sh/sh.md. Specifically, it forces the aopsi3 pattern to use the IOR (Integer OR) instruction for AOP expansion, rather than the previously implied or chosen alternative. This change was necessary to fix regressions on the SH port related to PR 108477, where previous optimizations for that PR negatively impacted the generated code for certain SH instructions.
- SH port
- Refers to the GCC compiler backend targeting the SuperH (SH) family of microprocessors.
- AOP expansion
- Automatic Operand expansion, a compiler optimization technique that simplifies or replaces complex operand patterns with simpler instructions. In this context, it refers to how certain bitwise operations are expanded for the SH architecture.
- IOR
- Integer OR, a bitwise logical operation that performs the OR operation on corresponding bits of two integers. It's also used here to refer to a specific instruction or pattern that implements this operation for the SH architecture.
- PR 108477
- A problem report (bug report) filed against GCC, identified by the number 108477. This commit addresses regressions caused by changes made to fix this PR.
- sh.md
- A file containing machine-description information for the SH architecture in GCC's compiler backend. It specifies instruction patterns, constraints, and optimization rules.