On 11/14/22 09:29, jiawei wrote:
Skip add insn generate if the adjust size equal to zero. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_expand_epilogue): New if control segement. --- gcc/config/riscv/riscv.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 02a01ca0b7c..af138db7545 100644 --- a/gcc/config/riscv/riscv.cc +++ b/gcc/config/riscv/riscv.cc @@ -5186,24 +5186,26 @@ riscv_expand_epilogue (int style) }/* Get an rtx for STEP1 that we can add to BASE. */- rtx adjust = GEN_INT (step1.to_constant ()); - if (!SMALL_OPERAND (step1.to_constant ())) + if (step1.to_constant () != 0){
This doesn't follow GCC formatting rules. The open-curley should go on a new line, intended two spaces further in. This will (of course) cause other code to need to be reindented as well.
Jeff
