asb added a comment. I think I may have had the impression from some previous discussions that byval may have limited positive impact, and that letting Clang add the copies to the IR might in some cases help optimisations (that may not be written to reason about byval). You've got a good example of a case where the lack of byval causes weaker optimisation though.
Just running this across the GCC torture suite on rv32imafdc_{ilp32,ilp32d}, rv64imafdc_{lp64, lp64d} and {O0,O1 <https://reviews.llvm.org/owners/package/1/>,O2 <https://reviews.llvm.org/owners/package/2/>,O3 <https://reviews.llvm.org/owners/package/3/>,Os}, I see `22394 insertions(+), 17462 deletions(-)` in the generated .s. Obviously not a representative benchmark, but it does seem there are potential regressions to consider. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97896/new/ https://reviews.llvm.org/D97896 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits