[PATCH] D62686: [RISCV] Add support for save/restore of callee-saved registers via libcalls

Ana Pazos via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 2 14:55:05 PDT 2019


apazos added a comment.

Lewis, with this patch we see less failures. But still some tests in SPEC and perennial test suites are failing.

Pengxuan and I are trying to triage the failures.

Here is what we see in one of the failed tests:

Code right before rologue/Epilogue Insertion & Frame Finalization:

  %call39 = tail call i32 @somefunction()
  ret i32 %call39

Code after Prologue/Epilogue Insertion & Frame Finalization:

  PseudoCALL target-flags(<unknown>) @somefunction, implicit-def $x1, implicit $x2
  $x10 = frame-destroy LUI 1
  $x10 = frame-destroy ADDI killed $x10, -1712
  $x2 = frame-destroy ADD $x2, killed $x10
  CFI_INSTRUCTION def_cfa_offset 0
  frame-destroy PseudoTAIL target-flags(<unknown>) &__riscv_restore_12, implicit $x2

x10 is the return value and it is being overwritten.

Is this patch self contained? Or does it depend on another patch under review?

For the tests that are passing, I see better code size reduction with C extension enabled (testing RV32IMAC) than with the machine outliner.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62686/new/

https://reviews.llvm.org/D62686





More information about the cfe-commits mailing list