This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r277861 - in /trunk/gcc: ChangeLog expr.c tests...


Author: wilson
Date: Tue Nov  5 22:34:40 2019
New Revision: 277861

URL: https://gcc.gnu.org/viewcvs?rev=277861&root=gcc&view=rev
Log:
Allow libcalls for complex memcpy when optimizing for size.

The RISC-V backend wants to use a libcall when optimizing for size if
more than 6 instructions are needed.  Emit_move_complex asks for no
libcalls.  This case requires 8 insns for rv64 and 16 insns for rv32,
so we get fallback code that emits a loop.  Commit_one_edge_insertion
doesn't allow code inserted for a phi node on an edge to end with a
branch, and so this triggers an assertion.  This problem goes away if
we allow libcalls when optimizing for size, which gives the code the
RISC-V backend wants, and avoids triggering the assert.

	gcc/
	PR middle-end/92263
	* expr.c (emit_move_complex): Only use BLOCK_OP_NO_LIBCALL when
	optimize_insn_for_speed_p is true.

	gcc/testsuite/
	PR middle-end/92263
	* gcc.dg/pr92263.c: New.

Added:
    trunk/gcc/testsuite/gcc.dg/pr92263.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c
    trunk/gcc/testsuite/ChangeLog


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]