V850: Fix output_operand to handle (high (const ...))
V850 backend now correctly handles (high (const ...)) in output_operand, fixing regressions.
This commit addresses a regression in the V850 backend where the output_operand function failed to handle expressions of the form (high (const ...)). The fix involves stripping the high construct and falling back to the existing const case, resolving test failures related to graphite interchange and other regressions.
In Details
The v850_print_oprerand function in config/v850/v850.cc is modified to correctly handle operands that are structured as (high (const ...)). Previously, this pattern could lead to errors or incorrect output on the V850 target. The fix ensures that the high part is stripped, allowing the operand to be treated as a simple constant, which resolves regressions observed in graphite interchange tests and PR85164.
- output_operand
- A function or mechanism within a compiler backend responsible for formatting and outputting operands (like constants, variables, or expressions) into the target machine's assembly language or instruction representation.
- (high (const ...))
- An expression format in GCC's internal representation where a constant value is decomposed into its high part, often used in address calculation or for targets with limited immediate field sizes.
- V850
- A family of 32-bit microcontrollers and microprocessors developed by Renesas (formerly NEC).
- graphite
- A set of GCC passes focused on loop transformations and data locality optimizations, aiming to improve performance for array-intensive code.